Method and system for detecting low level P-waves

ABSTRACT

A computer implemented method and system to detect P-waves in cardiac activity is provided. The system includes memory to store specific executable instructions. One or more processors are configured to execute the specific executable instructions for obtaining far field cardiac activity (CA) signals for a series of beats, applying a P-wave template to at least one sub-segment of the CA signals to obtain an alignment indicator and calculating an amplitude dependence (AD) indicator based at least in part on the P-wave template and the at least one sub-segment. The system analyzes the alignment indicator based on a first criteria, compares the AD indicator with a second criteria, designates a candidate P-wave to be an actual P-wave based on the analyzing and comparing and records results of the designating.

FIELD OF THE INVENTION

Embodiments herein relate generally to implantable medical devices, andmore particularly to detection of low-level P-waves and discriminationof noise in cardiac activity signals.

BACKGROUND OF THE INVENTION

Physicians implant insertable cardiac monitors (ICMs) to detect variousarrhythmias, such as associated with syncope, atrial fibrillation (AF)(e.g., before and after ablation), bradycardia, tachycardia andcryptogenic stroke. Electrophysiologist are interested in detecting AFand ultimately treating AF with ablation. Physicians often ablate apatient multiple times and utilize ICMs to obtain objective informationregarding an impact of the ablation upon AF. Various algorithms havebeen proposed for detecting AF. Among others, AF detection algorithmshave been proposed that utilize R-R interval variability and otherinterval dependent information to identify AF episodes. However, in someinstances, conventional AF detection algorithms may under detect AFepisodes or declare an AF episode when none is present, such as inconnection with over sensing.

Heretofore, ICMs have not been able to reliably utilize P-wave detectionas a mechanism for identifying arrhythmias. Among other challenges,P-waves captured with ICM electrodes are very small, on the order of 10to 60 microvolts and are often “lost in the noise”, while R-waves aretypically hundreds of microvolts. In order to enhance the signal tonoise (S/N) ratio, it has been proposed to use signal averaging ofP-waves to improve discrimination. However, P-wave averaging requiresseveral beats to enhance the S/N ratio. This is not a dramatic increasein S/N ratio because the S/N ratio goes with the square root of thenumber of elements in the ensemble.

Also, a leadless pacemaker intended for implant within a ventricle hasalso been proposed that utilizes correlation for tracking far-fieldP-waves that are detected by electrodes on the housing of the leadlesspacemaker while implanted in the ventricle. Tracking P-waves make VDDpacing a possibility enabling maintenance of the atrial contribution toventricular filling in patients with an intact sinus mechanism. Thefar-field P-waves, detected by the leadless pacemaker, have an amplitudein the order of between 20 and 60 uV.

An opportunity remains to improve the accuracy of implantable devicesfor sensing P-waves, discriminating noise, accurately identifyingvarious arrhythmias (e.g., syncope, AF, bradycardia, tachycardia andcryptogenic stroke), generating accurate diagnostics and computingshort/long term trends in physiological signals leading to actionableinsights and predictions

SUMMARY

In accordance with embodiments herein, a system for detecting P-waves incardiac activity is provided. The system includes memory to storespecific executable instructions. One or more processors are configuredto execute the specific executable instructions for obtaining far fieldcardiac activity (CA) signals for a series of beats, applying a P-wavetemplate to at least one sub-segment of the CA signals to obtain analignment indicator and calculating an amplitude dependence (AD)indicator based at least in part on the P-wave template and the at leastone sub-segment. The system analyzes the alignment indicator based on afirst criteria, compares the AD indicator with a second criteria,designates a candidate P-wave to be an actual P-wave based on theanalyzing and comparing and records results of the designating.

Optionally, the one or more processors may further be configured toexecute the specific executable instructions for identifying an R-waveCOI from a beat in the series of beats. The processors may define theP-wave search window to overlay the sub-segment of the CA signals at apredetermined time prior to the R-wave COI for the beat, may collect thesubsegment of the CA signals overlaid by the P-wave search window,repeating the identifying, defining and collecting to obtain on ensembleof subsegments for the series of beats. The processors may combine theensemble of subsegments to form an ensemble average of the CA signalswithin the P-wave search window for the series of beats and maycalculate a correlation of the ensemble average with the P-wave templateto obtain the alignment indicator.

Optionally, the applying by the one or more processors may furthercomprise applying the P-wave template to sub-segments of the CA signalsalong a P-wave search window to obtain, as the alignment indicator, atemporal alignment (TA) indicator across the P-wave search window, andwherein the analyzing by the one or more processors further comprisesanalyzing the TA indicator based on the first criteria to identify thecandidate P-wave. The TA indicator may represent a measure of howchanges in the P-wave template are associated with changes in thecorresponding subsegments of the CA signals and wherein the firstcriteria corresponds to a maximum for the TA indicator over the P-wavesearch window. The candidate P-wave may correspond to the subsegment ofthe CA signal for which the corresponding TA indicator has the maximum.

Optionally, the one or more processors may be configured to iterativelycorrelate the P-wave template to the sub-segments of the CA signalsalong the P-wave search window to obtain a correlation function acrossthe P-wave search window as the temporal alignment indicator. The one ormore processors may be configured to analyze the temporal alignmentindicator by identify a peak in the correlation function and identifythe candidate P-wave based on the peak in the correlation function. Theone or more processors may be configured to calculate a covariancefunction based on the correlation function, the covariance functionrepresenting the AD indicator.

Optionally, the second criteria may represent a tolerance range that maybe defined based on a peak of the P-wave template. The one or moreprocessors may be configured to determine whether the covariancefunction is within the tolerance range. The one or more processors maybe configured to apply the P-wave template to the segments of anensemble of CA signals collected over multiple beats. The one or moreprocessors may be configured to calculate a plurality of P-wavetemplates associated with different postures and utilize a select one ofthe P-wave templates based on a current posture of the patient when theCA signals are collected.

In accordance with embodiments herein, a computer implemented method isprovided. The method is under control of one or more processorsconfigured with specific executable instructions. The method obtains farfield cardiac activity (CA) signals for a series of beats, applies aP-wave template to at least one sub-segment of the CA signals to obtainan alignment indicator and calculates an amplitude dependence (AD)indicator based at least in part on the P-wave template and the at leastone sub-segment. The method analyze the alignment indicator based on afirst criteria, compares the AD indicator with a second criteria,designates a candidate P-wave to be an actual P-wave based on theanalyzing and comparing and records results of the designating.

Optionally, the method may identify an R-wave COI from a beat in theseries of beats. The method may define the P-wave search window tooverlay the sub-segment of the CA signals at a predetermined time priorto the R-wave COI for the beat and may collect the subsegment of the CAsignals overlaid by the P-wave search window. The method may repeat theidentifying, defining and collecting to obtain on ensemble ofsubsegments for the series of beats, combining the ensemble ofsubsegments to form an ensemble average of the CA signals within theP-wave search window for the series of beats. The method may calculate acorrelation of the ensemble average with the P-wave template to obtainthe alignment indicator.

Optionally, the applying may further comprise applying the P-wavetemplate to sub-segments of the CA signals along a P-wave search windowto obtain, as the alignment indicator, a temporal alignment (TA)indicator across the P-wave search window, and wherein the analyzingfurther comprises analyzing the TA indicator based on the first criteriato identify the candidate P-wave. The one or more processors may beconfigured to at least one of: i) perform the applying, calculating,analyzing and comparing in a parallel manner, or ii) perform theapplying, calculating, analyzing and comparing in a serial manner.

Optionally, the applying may include iteratively correlating the P-wavetemplate to the sub-segments of the CA signals along the P-wave searchwindow to obtain a correlation function across the P-wave search windowas the temporal alignment indicator. The analyzing the temporalalignment indicator based on the first criteria may include identifyinga peak in the correlation function and identifying the candidate P-wavebased on the peak in the correlation function.

Optionally, the CA signals may represent intracardiac electrograms(IEGM). The method may comprise calculating the P-wave template bydisplaying on a graphical user interface (GUI) IEGM signals and surfaceelectrocardiogram (EKG) signals. The method may receive a user inputfrom the GUI an input designating at least one of: 1) P-waves on theIEGM signals, 2) P-waves on surface EKG signals and P waves on the IEGMsignals, or 3) P-waves on the surface EKG signals. The user input maydesignate select points corresponding to the P-waves and may identifythe segment of the CA signals that includes the corresponding P-waves.The method may repeat the displaying, receiving and identifying tocalculate a plurality of P-wave templates associated with differentpostures and utilizing a select one of the P-wave templates based on acurrent posture of the patient when the CA signals are collected. Themethod may calculate separate P-wave templates corresponding to apatient standing, the patient sitting, the patient lying on his/herback, and the patient lying on each side.

The obtaining the CA signals may comprise collecting the CA signals inreal time by an implantable medical device in connection with anarrhythmia detection process. The arrhythmia detection processes mayidentify variability in RR intervals within the series of beats in theCA signals, declare an arrhythmia episode based on variability in the RRintervals and may store a segment of the CA signals for the series ofbeats in connection with the arrhythmia episode. The process mayiteratively implement the applying, calculating, analyzing, comparing,and designating to determine whether actual P waves occur consistentlythroughout the series of beats and may validate or reject the arrhythmiaepisode based on the determination of whether the actual P waves occurconsistently throughout the series of beats.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an implantable cardiac monitoring device (ICM)intended for subcutaneous implantation at a site near the heart inaccordance with embodiments herein.

FIG. 2 shows a block diagram of the ICM formed in accordance withembodiments herein.

FIG. 3A shows a process for detecting P-waves in accordance withembodiments herein.

FIG. 3B illustrates an alternative approach in accordance withembodiments herein.

FIG. 4 illustrates a process for acquiring one or more P-wave templatesin accordance with embodiments herein.

FIG. 5 illustrates a first example of a CA signal, correlation functionand covariance function determined in accordance with embodimentsherein.

FIG. 6 illustrates a second example of a CA signal, correlation functionand covariance function determined in accordance with embodimentsherein.

FIG. 7A illustrates example P-wave templates that may be derived fordifferent patients in accordance with embodiments herein.

FIG. 7B illustrates example P-wave templates that may be derived fordifferent patients in accordance with embodiments herein.

FIG. 7C illustrates example P-wave templates that may be derived fordifferent patients in accordance with embodiments herein.

FIG. 8 illustrates a power spectra of CA signals collected by an ICMwith the horizontal axis denoting frequency components of the CA signalsand the vertical axis denoting power in accordance with embodimentsherein.

FIG. 9 illustrates a system level diagram indicating devices andnetworks in accordance with embodiments herein.

FIG. 10 illustrates a distributed processing system in accordance withembodiments herein.

FIG. 11A illustrates a process in which the P-wave detection processesdescribed herein may be implemented in connection with detecting atrialfibrillation.

FIG. 11B illustrates an example for consistent P waves analyzed inaccordance with embodiments herein.

FIG. 11C illustrates alternative examples of groups of candidate P wavesthat may be combined.

DETAILED DESCRIPTION

The terms “cardiac activity signal”, “cardiac activity signals”, “CAsignal” and “CA signals” (collectively “CA signals”) are usedinterchangeably throughout to refer to an analog or digital electricalsignal recorded by two or more electrodes positioned subcutaneous orcutaneous, where the electrical signals are indicative of cardiacelectrical activity. The cardiac activity may be normal/healthy orabnormal/arrhythmic. Non-limiting examples of CA signals include ECGsignals collected by cutaneous electrodes, and EGM signals collected bysubcutaneous electrodes.

The terms “beat” and “cardiac event” are used interchangeably and referto both normal or abnormal events.

The terms “normal” and “sinus” are used to refer to events, features,and characteristics of, or appropriate to, a heart's healthy or normalfunctioning.

The terms “abnormal,” or “arrhythmic” are used to refer to events,features, and characteristics of, or appropriate to, an un-healthy orabnormal functioning of the heart.

The term “real-time” refers to a time frame contemporaneous with anormal or abnormal episode occurrences. For example, a real-time processor operation would occur during or immediately after (e.g., withinminutes or seconds after) a cardiac event, a series of cardiac events,an arrhythmia episode, and the like.

In accordance with new and unique aspects herein, embodiments areproposed for detection far field P-waves. Among other things, themethods and systems herein: 1) detect an R-wave. 2) use an establishedP-wave template to correlate the template over an interval preceding theR-wave; and 3) determine whether two criteria are met to identify thepresence of a P-wave when the template achieves what is deemed as amatch, the methods and systems further determine whether and if theamplitude of the matching event is in accordance with the “typical” orprojected amplitude of a P-wave.

Embodiments may be implemented in connection with one or moreimplantable medical devices (IMDs). Non-limiting examples of IMDsinclude one or more of implantable leadless monitoring and/or therapydevices, and/or alternative implantable medical devices. As anonlimiting example, the IMD may include a transvenous lead located in asingle chamber, such as in the right ventricle (e.g., a single chamberICD), wherein far field P waves are measured and processed in accordancewith embodiments herein. For example, the IMD may represent a cardiacmonitoring device, pacemaker, cardioverter, cardiac rhythm managementdevice, defibrillator, leadless monitoring device, leadless pacemakerand the like. For example, the IMD may include one or more structuraland/or functional aspects of the device(s) described in U.S. Pat. No.9,333,351 “Neurostimulation Method And System To Treat Apnea” and U.S.Pat. No. 9,044,610 “System And Methods For Providing A DistributedVirtual Stimulation Cathode For Use With An Implantable NeurostimulationSystem”, which are hereby incorporated by reference.

Additionally or alternatively, the IMD may be a leadless implantablemedical device (LIMD) that include one or more structural and/orfunctional aspects of the device(s) described in U.S. Pat. No. 9,216,285“Leadless Implantable Medical Device Having Removable And FixedComponents” and U.S. Pat. No. 8,831,747 “Leadless NeurostimulationDevice And Method Including The Same”, which are hereby incorporated byreference. Additionally or alternatively, the IMD may include one ormore structural and/or functional aspects of the device(s) described inU.S. Pat. No. 8,391,980 “Method And System For Identifying A PotentialLead Failure In An Implantable Medical Device” and U.S. Pat. No.9,232,485 “System And Method For Selectively Communicating With AnImplantable Medical Device”, which are hereby incorporated by reference.

Additionally or alternatively, the IMD may be a subcutaneous IMD thatincludes one or more structural and/or functional aspects of thedevice(s) described in U.S. application Ser. No. 15/973,195, titled“Subcutaneous Implantation Medical Device With MultipleParasternal-Anterior Electrodes” and filed May 7, 2018; U.S. applicationSer. No. 15/973,219, titled “Implantable Medical Systems And MethodsIncluding Pulse Generators And Leads” filed May 7, 2018; U.S.application Ser. No. 15/973,249, titled “Single Site ImplantationMethods For Medical Devices Having Multiple Leads”, filed May 7, 2018,which are hereby incorporated by reference in their entireties. Further,one or more combinations of IMDs may be utilized from the aboveincorporated patents and applications in accordance with embodimentsherein.

Additionally or alternatively, the IMD may be a leadless cardiac monitor(ICM) that includes one or more structural and/or functional aspects ofthe device(s) described in U.S. patent application Ser. No. 15/084,373,filed Mar. 29, 2016, entitled, “METHOD AND SYSTEM TO DISCRIMINATE RHYTHMPATTERNS IN CARDIAC ACTIVITY,” which is expressly incorporated herein byreference.

Additionally or alternatively, the IMD may implement the P-wavedetection processes described herein, in connection the confirmationalgorithms described in U.S. patent application Ser. No. 15/973,126,titled “METHOD AND SYSTEM FOR SECOND PASS CONFIRMATION OF DETECTEDCARDIAC ARRHYTHMIC PATTERNS”; U.S. patent application Ser. No.15/973,351, titled “METHOD AND SYSTEM TO DETECT R-WAVES IN CARDIACARRHYTHMIC PATTERNS”; U.S. patent application Ser. No. 15/973,307,titled “METHOD AND SYSTEM TO DETECT POST VENTRICULAR CONTRACTIONS INCARDIAC ARRHYTHMIC PATTERNS”; and U.S. patent application Ser. No.16/399,813, titled “METHOD AND SYSTEM TO DETECT NOISE IN CARDIACARRHYTHMIC PATTERNS.”

All references, including publications, patent applications and patents,cited herein are hereby incorporated by reference to the same extent asif each reference were individually and specifically indicated to beincorporated by reference and were set forth in its entirety herein.

FIG. 1 illustrates an implantable cardiac monitoring device (ICM) 100intended for subcutaneous implantation at a site near the heart. The ICM100 includes a pair of spaced-apart sense electrodes 114, 126 positionedwith respect to a housing 102. The sense electrodes 114, 126 provide fordetection of far field electrogram signals. Numerous configurations ofelectrode arrangements are possible. For example, the electrode 114 maybe located on a distal end of the ICM 100, while the electrode 126 islocated on a proximal side of the ICM 100. Additionally oralternatively, electrodes 126 may be located on opposite sides of theICM 100, opposite ends or elsewhere. The distal electrode 114 may beformed as part of the housing 102, for example, by coating all but aportion of the housing with a nonconductive material such that theuncoated portion forms the electrode 114. In this case, the electrode126 may be electrically isolated from the housing 102 electrode byplacing it on a component separate from the housing 102, such as theheader 120. Optionally, the header 120 may be formed as an integralportion of the housing 102. The header 120 includes an antenna 128 andthe electrode 126. The antenna 128 is configured to wirelesslycommunicate with an external device 154 in accordance with one or morepredetermined wireless protocols (e.g., Bluetooth, Bluetooth low energy,Wi-Fi, etc.). The housing 102 includes various other components such as:sense electronics for receiving signals from the electrodes, amicroprocessor for processing the signals in accordance with algorithms,such as the P-wave detection algorithm described herein, a loop memoryfor temporary storage of CA data, a device memory for long-term storageof CA signals upon certain triggering events, such as AF detection,sensors for detecting patient activity and a battery for poweringcomponents.

In at least some embodiments, the ICM 100 is configured to be placedsubcutaneously utilizing a minimally invasive approach. Subcutaneouselectrodes are provided on the housing 102 to simplify the implantprocedure and eliminate a need for a transvenous lead system. Thesensing electrodes may be located on opposite sides of the device anddesigned to provide robust episode detection through consistent contactat a sensor-tissue interface. The ICM 100 may be configured to beactivated by the patient or automatically activated, in connection withrecording subcutaneous ECG signals.

The ICM 100 senses far field, subcutaneous CA signals, processes the CAsignals to detect arrhythmias and if an arrhythmia is detected,automatically records the CA signals in memory for subsequenttransmission to an external device 154. The CA signal processing andarrhythmia detection is provided for, at least in part, by algorithmsembodied in or implemented by the microprocessor. The ICM 100 includesone or more processors and memory that stores program instructionsdirecting the processors to implement arrhythmia detection utilizing anon-board R-R interval irregularity (ORI) process that analyzes cardiacactivity signals collected over one or more sensing channels.

FIG. 2 shows a block diagram of the ICM 100 formed in accordance withembodiments herein. The ICM 100 may be implemented to monitorventricular activity alone, or both ventricular and atrial activitythrough sensing circuit. The ICM 100 has a housing 102 to hold theelectronic/computing components. The housing 102 (which is oftenreferred to as the “can”, “case”, “encasing”, or “case electrode”) maybe programmably selected to act as an electrode for certain sensingmodes. Housing 102 further includes a connector (not shown) with atleast one terminal 113 and optionally additional terminals 115. Theterminals 113, 115 may be coupled to sensing electrodes that areprovided upon or immediately adjacent the housing 102. Optionally, morethan two terminals 113, 115 may be provided in order to support morethan two sensing electrodes, such as for a bipolar sensing scheme thatuses the housing 102 as a reference electrode. Additionally oralternatively, the terminals 113, 115 may be connected to one or moreleads having one or more electrodes provided thereon, where theelectrodes are located in various locations about the heart. The typeand location of each electrode may vary.

The ICM 100 includes a programmable microcontroller 121 that controlsvarious operations of the ICM 100, including cardiac monitoring.Microcontroller 121 includes a microprocessor (or equivalent controlcircuitry), RAM and/or ROM memory, logic and timing circuitry, statemachine circuitry, and I/O circuitry. The microcontroller 121 alsoperforms the operations described herein in connection with collectingcardiac activity data and analyzing the cardiac activity data toidentify AF episodes.

A switch 127 is optionally provided to allow selection of differentelectrode configurations under the control of the microcontroller 121.The electrode configuration switch 127 may include multiple switches forconnecting the desired electrodes to the appropriate I/O circuits,thereby facilitating electrode programmability. The switch 127 iscontrolled by a control signal from the microcontroller 121. Optionally,the switch 127 may be omitted and the I/O circuits directly connected tothe housing electrode 114 and a second electrode 126. Microcontroller121 includes an arrhythmia detector 134 that is configured to analyzecardiac activity signals to identify potential AF episodes as well asother arrhythmias (e.g., Tachcardias, Bradycardias, Asystole, etc.). Byway of example, the arrhythmia detector 134 may implement an AFdetection algorithm as described in U.S. Pat. No. 8,135,456, thecomplete subject matter of which is incorporated herein by reference.Although not shown, the microcontroller 121 may further include otherdedicated circuitry and/or firmware/software components that assist inmonitoring various conditions of the patient's heart and managing pacingtherapies.

The ICM 100 is further equipped with a communication modem(modulator/demodulator) 140 to enable wireless communication. In oneimplementation, the communication modem 140 uses high frequencymodulation, for example using RF, Bluetooth or Bluetooth Low Energytelemetry protocols. The signals are transmitted in a high frequencyrange and will travel through the body tissue in fluids withoutstimulating the heart or being felt by the patient. The communicationmodem 140 may be implemented in hardware as part of the microcontroller121, or as software/firmware instructions programmed into and executedby the microcontroller 121. Alternatively, the modem 140 may resideseparately from the microcontroller as a standalone component. The modem140 facilitates data retrieval from a remote monitoring network. Themodem 140 enables timely and accurate data transfer directly from thepatient to an electronic device utilized by a physician.

The ICM 100 includes sensing circuit 144 selectively coupled to one ormore electrodes that perform sensing operations, through the switch 127to detect cardiac activity data indicative of cardiac activity. Thesensing circuit 144 may include dedicated sense amplifiers, multiplexedamplifiers, or shared amplifiers. It may further employ one or more lowpower, precision amplifiers with programmable gain and/or automatic gaincontrol, bandpass filtering, and threshold detection circuit toselectively sense the features of interest. In one embodiment, switch127 may be used to determine the sensing polarity of the cardiac signalby selectively closing the appropriate switches.

The output of the sensing circuit 144 is connected to themicrocontroller 121 which, in turn, determines when to store the cardiacactivity data of CA signals (digitized by the A/D data acquisitionsystem 150) in the memory 160. For example, the microcontroller 121 mayonly store the cardiac activity data (from the ND data acquisitionsystem 150) in the memory 160 when a potential AF episode is detected.The sensing circuit 144 receives a control signal 146 from themicrocontroller 121 for purposes of controlling the gain, threshold,polarization charge removal circuitry (not shown), and the timing of anyblocking circuitry (not shown) coupled to the inputs of the sensingcircuit.

In the example, a single sensing circuit 144 is illustrated. Optionally,the ICM 100 may include multiple sensing circuits, similar to sensingcircuit 144, where each sensing circuit is coupled to two or moreelectrodes and controlled by the microcontroller 121 to sense electricalactivity detected at the corresponding two or more electrodes. Thesensing circuit 144 may operate in a unipolar sensing configuration orin a bipolar sensing configuration. Optionally, the sensing circuit 144may be removed entirely and the microcontroller 121 perform theoperations described herein based upon the CA signals from the ND dataacquisition system 150 directly coupled to the electrodes.

The arrhythmia detector 134 of the microcontroller 121 includes anon-board R-R interval irregularity (ORI) process 136 that detects AFepisodes using R-R interval irregularities as discussed in connectionwith FIGS. 17-18. The ORI process 136 may be implemented as firmware,software and/or circuits. The ORI process 136 uses a hidden MarkovChains and Euclidian distance calculations of similarity to assess thetransitionary behavior of one R-wave (RR) interval to another andcompare the patient's RR interval transitions to the known RR intervaltransitions during AF and non-AF episodes obtained from the same patientand/or many patients. The ORI process 136 detects AF episodes over ashort number of RR intervals. For example, the ORI process 136 mayimplement the AF detection methods described in U.S. Pat. No. 8,135,456,the complete subject matter of which is incorporated herein by referencein its entirety.

The ICM 100 further includes an analog-to-digital ND data acquisitionsystem (DAS) 150 coupled to one or more electrodes via the switch 127 tosample cardiac activity signals across any pair of desired electrodes.The data acquisition system 150 is configured to acquire cardiacelectrogram (EGM) signals as CA signals, convert the raw analog datainto digital data, and store the digital data as CA data for laterprocessing and/or telemetric transmission to an external device 154(e.g., a programmer, local transceiver, or a diagnostic systemanalyzer). The data acquisition system 150 is controlled by a controlsignal 156 from the microcontroller 121. The EGM signals may be utilizedas the cardiac activity data that is analyzed for potential P-waves andepisodes.

FIG. 8 illustrates a power spectra of CA signals collected by an ICMwith the horizontal axis denoting frequency components of the CA signalsand the vertical axis denoting power (Vrms/Sqrt(Hz)). A first trace 800represents the power spectrum of an R-wave. A second trace 804represents the power spectrum of a T-wave. A third trace 802 representsthe power spectrum of a P-wave. Note that the P-wave has very littleenergy above 16 Hertz, whereas the R-wave has very little energy above40 Hz. A basic fundamental peak in the power spectra of a P-wave is ataround 3 to 4 Hertz, whereas the peak in the power spectrum of an R-waveis between 20 Hz and 30 Hz.

In accordance with new and unique aspects herein, it has been recognizedthat a sampling rate appropriate for R-wave detection and analysis ismuch higher than a sampling rate necessary for P-wave detection andanalysis. The Nyquist sampling theorem provides that a band limitedcontinuous time signal can be sampled and substantially completelyreconstructed from samples if the waveform is sampled over twice as fastas the highest frequency component of the waveform being sampled. In theforegoing examples, the R-wave has very little energy in the frequencycomponents above 40 Hz (corresponding to a Nyquist frequency at or abovehundred Hz), whereas a P-wave has very little energy in the frequencycomponents above 16 Hertz (corresponding to a Nyquist limit at or above40 Hz).

For example, in connection with R-wave detection and analysis, the dataacquisition system 150 may collect a new data sample from the CA signalapproximately every 2 ms (corresponding to a sampling rate of 512 Hz).The data samples may then all be stored (every 2 ms). Alternatively,only a subset of the data samples may be stored. Additionally oralternatively, the data samples may be combined into ensemble averagesand then stored. For example, the data sample from the CA signals may bestored approximately every 8 ms (corresponding to a storage rate ofapproximately 128 Hz), such as storing every fourth data sample orstoring an ensemble average of every four data samples. In R-wavetypically exhibits a sharper and narrower peak as compared to the peakand shape of a P-wave. The foregoing example of data sampling ratesaffords a desired sampling rate to achieve a desired level of accuracywhen detecting and analyzing R waves.

However, given the different power spectrums (and peak shapes) of anR-wave and a P-wave, it has been recognized that a lower sampling ratemay be utilized in connection with P-wave detection without sacrificingany accuracy. For example, in accordance with embodiments herein, it hasbeen found that sampling at 64 samples per second would more than exceedthe Nyquist Frequency (around 40 Hz). Consequently, it would onlyrequire approximately 24 samples of the CA signals spread over a 400 msP-wave search window to accurately capture a P-wave. In accordance withembodiments herein, methods and systems could easily determine the peakof the P-wave from the peak correlation with the template based on asampling rate of 1 digitized CA signal data sample every 15 ms. Sampling100 ms on either side of the anticipated peak of the P-wave would onlyrequire 13 samples to capture the P-wave. For example, if the peakcorrelation with the P-wave template occurs at 120 ms prior to theR-wave, then sampling from 220 ms to 20 ms prior to the R-wave shouldprovide an adequate P-wave detection window.

The A/D DAS 150 samples the CA signals at a rate based on thecharacteristic of interest (COI) in the CA signals. In many implantabledevices, it is desirable to sample the CA signals over at least onechannel at a sampling rate sufficient to capture COI from the R-wave,and thus the CA signals may be sampled at around 512 Hz (and optionallysaved at a rate of 128 Hz). In R-wave detection and analysis channel orprocessing path may then analyze the data samples (collected over thehigher rate of 512 or 128) for R-wave characteristics of interest.However, a P-wave detection process may only obtain a subset of the datasamples (collected over the higher data sample collection channel). Thesubset of data samples may be collected through decimation or otherprocesses. For example, P-wave detection process may pull a subset ofthe data samples for processing, such as every eight data sample fromthe 512 Hz sampling rate. In the foregoing example, a single channel isused for analog to digital conversion and filtering, with the resultingdigitized/filtered data passed along alternative channels, namely inR-wave processing channel at a higher data rate and a P-wave processingchannel at a lower data rate. Additionally or alternatively, separateanalog-to-digital conversion and filtering channels may be provided,such as when different filtering requirements are of interest (e.g.,different pass bands, different bandwidths and the like). When separatechannels are utilized, the first or primary A/D channel may be utilizedto collect data samples in connection with R-wave detection at thehigher 512 Hz data sampling rate, while a second or secondary A/Dchannel is utilized to collect data samples in connection with P-wavedetection at the lower 64 Hz data sampling rate.

A limited number of digitized data samples may be collected from eachindividual CA signal segment and then added to the ensemble average.Embodiments herein utilize very few data samples (e.g., as few as foursamples per P-wave search window) or as many more samples as appropriateto achieve a desired S/N ratio or frequency of P-wave verification. Thenumber of digitized data samples per CA signal segment may be relativelylimited because, among other things, P-waves have relatively lowfrequency content below 20 Hz. Therefore, sampling at 64 samples persecond should provide adequate capture of the P-wave. Furthermore, asthe algorithm predicts the expected occurrence of the P-wave peakrelative to the R-wave, then sampling 100 ms on either side of the peakprovides a window that captures the entire P-wave. Averaging is achievedwith as few as 13 samples added to the ensemble average per cardiaccycle.

The digital CA data samples are passed to the microcontroller 121 and toensemble averaging (EA) firmware 151. The EA firmware 151 is configuresto collect and combine segments of CA data samples from multiple beats,within corresponding P-wave search windows. For example, the EA firmware151 may average together CA data samples from 3-16 beats. As a furtherexample, the A/D converter 150 may sample the analog CA signals at ahigher sampling rate associated with detection and analysis of R-wavecharacteristics of interest (e.g., one data sample every 2 ms or asampling rate of approximately 512 Hz). The EA firmware 151 may onlypull/obtain (e.g., through decimation) a subset of the data samplesoutput from the A/D converter 150 at a lower sampling rate (e.g., onedata sample every 16 ms or a data sampling rate of approximately 64 Hz).

Optionally, a first A/D DAS may be used to collect P-wave segments at afirst sampling rate and a second A/D DAS may be used to collect theentire CA signal and/or R-wave segments at a second higher samplingrate.

The microcontroller 121 also includes a P-wave detection process 137that may be implemented by one or more processors that are configured toexecute the specific executable instructions stored in memory. The A/Dconverter 150, under control of the microcontroller 121, obtains farfield cardiac activity (CA) signals for a series of beats. The P-wavedetection process 137 applies a P-wave template to at least onesubsegment of the CA signals to obtain an alignment indicator. Inaccordance with the embodiment of FIG. 3A, the P-wave detection process137 applies a P-wave template to sub-segments of the CA signals alongthe P-wave search window to obtain a temporal alignment (TA) indicator,as the alignment indicator, across the P-wave search window.Additionally or alternatively, in accordance with the embodiment of FIG.3B, the P-wave detection process 137 identifies an R-wave COI from abeat in the series of beats, defines the P-wave search window to overlaythe sub-segment of the CA signals at a predetermined time prior to theR-wave COI for the beat, and collects the subsegment of the CA signalsoverlaid by the P-wave search window. The P-wave detection process 137repeats the identifying, defining and collecting operations to obtain onensemble of subsegments for the series of beats. The P-wave detectionprocess 137 combines the ensemble of subsegments to form an ensembleaverage of the CA signals within the P-wave search window for the seriesof beats and calculates a correlation of the ensemble average with theP-wave template to obtain the alignment indicator.

The P-wave detection process 137 also calculates an amplitude dependence(AD) indicator based at least in part on the P-wave template and atleast one of the subsegment in connection with the embodiment of FIG.3A, the 80 indicator is calculated based on the TA indicator. The P-wavedetection process 137 analyzes the alignment indicator based on a firstcriteria to identify a candidate P-wave. The P-wave detection process137 compares the AD indicator with a second criteria. The P-wavedetection process 137 designates the candidate P-wave to be an actualP-wave based on the first and second comparing, and records results ofthe designating.

As explained herein, the first criteria may correspond to a maximum forthe TA indicator over the P-wave search window, the candidate P-wavecorresponding to the subsegment of the CA signal for which thecorresponding TA indicator has the maximum. Additionally oralternatively, the P-wave detection process 137 utilizes the one or moreprocessors to at least one of: i) perform the applying, calculating,analyzing and comparing in a parallel manner, or ii) perform theapplying, calculating, analyzing and comparing in a serial manner.Additionally or alternatively, the P-wave detection process 137 isconfigured to iteratively correlate the P-wave template to thesub-segments of the CA signals along the P-wave search window to obtaina correlation function across the P-wave search window as the temporalalignment indicator. Additionally or alternatively, the P-wave detectionprocess 137 is configured to analyze the temporal alignment indicator byidentify a peak in the correlation function and identify the candidateP-wave based on the peak in the correlation function. Additionally oralternatively, the P-wave detection process 137 is configured tocalculate a covariance function based on the correlation function, thecovariance function representing the AD indicator. As explained herein,the second criteria may represent a tolerance range that is definedbased on a peak of the P-wave template, and wherein the one or moreprocessors are configured to determine whether the covariance functionis within the tolerance range. Additionally or alternatively, the P-wavedetection process 137 is configured to apply the P-wave template to thesegments of an ensemble of CA signals collected over multiple beats.Additionally or alternatively, the P-wave detection process 137 isconfigured to calculate a plurality of P-wave templates associated withdifferent postures and utilize a select one of the P-wave templatesbased on a current posture of the patient when the CA signals arecollected.

By way of example, the external device 154 may represent a bedsidemonitor installed in a patient's home and utilized to communicate withthe ICM 100 while the patient is at home, in bed or asleep. The externaldevice 154 may be a programmer used in the clinic to interrogate the ICM100, retrieve data and program detection criteria and other features.The external device 154 may be a handheld device (e.g., smartphone,tablet device, laptop computer, smartwatch and the like) that can becoupled over a network (e.g., the Internet) to a remote monitoringservice, medical network and the like. The external device 154facilitates access by physicians to patient data as well as permittingthe physician to review real-time CA signals while collected by the ICM100.

The microcontroller 121 is coupled to a memory 160 by a suitabledata/address bus 162. The programmable operating parameters used by themicrocontroller 121 are stored in memory 160 and used to customize theoperation of the ICM 100 to suit the needs of a particular patient. Suchoperating parameters define, for example, detection rate thresholds,sensitivity, automatic features, AF detection criteria, activity sensingor other physiological sensors, and electrode polarity, etc.

In addition, the memory 160 stores the cardiac activity data, as well asthe markers and other data content associated with detection ofarrhythmia episodes. The operating parameters of the ICM 100 may benon-invasively programmed into the memory 160 through a telemetrycircuit 164 in telemetric communication via communication link 166 withthe external device 154. The telemetry circuit 164 allows intracardiacelectrograms and status information relating to the operation of the ICM100 (as contained in the microcontroller 121 or memory 160) to be sentto the external device 154 through the established communication link166. In accordance with embodiments herein, the telemetry circuit 164conveys the cardiac activity data, markers and other information relatedto AF episodes.

The ICM 100 may further include magnet detection circuitry (not shown),coupled to the microcontroller 121, to detect when a magnet is placedover the unit. A magnet may be used by a clinician to perform varioustest functions of the housing 102 and/or to signal the microcontroller121 that the external device 154 is in place to receive or transmit datato the microcontroller 121 through the telemetry circuits 164.

The ICM 100 can further include one or more physiologic sensors 170.Such sensors are commonly referred to (in the pacemaker arts) as“rate-responsive” or “exercise” sensors. The physiological sensor 170may further be used to detect changes in the physiological condition ofthe heart, or diurnal changes in activity (e.g., detecting sleep andwake states). Signals generated by the physiological sensors 170 arepassed to the microcontroller 121 for analysis and optional storage inthe memory 160 in connection with the cardiac activity data, markers,episode information and the like. While shown as being included withinthe housing 102, the physiologic sensor(s) 170 may be external to thehousing 102, yet still be implanted within or carried by the patient.Examples of physiologic sensors might include sensors that, for example,activity, temperature, sense respiration rate, pH of blood, ventriculargradient, activity, heart sounds, position/posture, minute ventilation(MV), and so forth.

A battery 172 provides operating power to all of the components in theICM 100. The battery 172 is capable of operating at low current drainsfor long periods of time. The battery 172 also desirably has apredictable discharge characteristic so that elective replacement timecan be detected. As one example, the housing 102 employs lithium/silvervanadium oxide batteries. The battery 172 may afford various periods oflongevity (e.g., three years or more of device monitoring). In alternateembodiments, the battery 172 could be rechargeable. See for example,U.S. Pat. No. 7,294,108, Cardiac event micro-recorder and method forimplanting same, which is hereby incorporated by reference.

The ICM 100 provides a simple to configure data storage option to enablephysicians to prioritize data based on individual patient conditions, tocapture significant events and reduce risk that unexpected events aremissed. The ICM 100 may be programmable for pre- and post-trigger eventstorage. For example, the ICM 100 may be automatically activated tostore 10-120 seconds of CA data prior to an event of interest and/or tostore 10-120 seconds of post CA data. Optionally, the ICM 100 may affordpatient triggered activation in which pre-event CA data is stored, aswell as post event CA data (e.g., pre-event storage of 1-15 minutes andpost-event storage of 1-15 minutes). Optionally, the ICM 100 may affordmanual (patient triggered) or automatic activation for CA data.Optionally, the ICM 100 may afford additional programming options (e.g.,asystole duration, bradycardia rate, tachycardia rate, tachycardia cyclecount). The amount of CA data storage may vary based upon the size ofthe memory 160.

The ICM 100 may provide comprehensive safe diagnostic data reportsincluding a summary of heart rate, in order to assist physicians indiagnosis and treatment of patient conditions. By way of example,reports may include episode-related diagnostics for auto trigger events,episode duration, episode count, episode date/time stamp and heart ratehistograms. The ICM 100 may be configured to be relatively small (e.g.,between 2-10 cc in volume) which may, among other things, reduce risk ofinfection during implant procedure, afford the use of a small incision,afford the use of a smaller subcutaneous pocket and the like. The smallfootprint may also reduce implant time and introduce less change in bodyimage for patients.

FIG. 3A shows a process for detecting P-waves in accordance withembodiments herein. By way of example, the operations of FIG. 3A may beimplemented, as part of an initial arrhythmia detection process and/or aconfirmatory process (e.g., where cardiac activity signals have beenpreviously analyzed by an AF detection module). The process maycontinuously implement the P-wave detection process and/or initiate theoperations of FIG. 3A attempting to verify whether one or more episodesin a CA data set, are in fact an arrhythmia episode or a normalrhythmic/sinus episode. Optionally, the operations of FIG. 3A may beimplemented in connection with a CA data set that has not beenpreviously analyzed for potential AF episodes. In the primary embodimentdescribed herein, the operations of FIG. 3A are implemented by theprocessor, firmware and other circuitry within the ICM. Additionally oralternatively, the operations of FIG. 3A may be implemented as part of alocal or distributed system. For example, the sensing operations may beperformed by the ICM, with the CA data transmitted to a local externaldevice and/or a remote server, which performs the additional operationsdescribed herein. Additionally or alternatively, a larger portion of theoperations may be implemented by the ICM (e.g., correlation,calculation, and designation of actual P-waves), while a smaller portion(e.g., generation of templates, setting criteria) of the operations areimplemented by the local external device and/or remote server. Theanalysis of FIG. 3A may be implemented as infrequently as once a day orevery few hours.

In accordance with new and unique aspects herein, a P-wave detectionprocess is described that utilizes two criteria for positiveidentification of an actual P-wave. The first criteria relate tocorrelation, while the second criteria relate to a determination ofwhether a P-wave amplitude is within a projected range (e.g., covarianceamplitude at a correlation peak is within a tolerance range of a maximumcovariance amplitude).

At 302, CA signals are collected over one or more sensing vectors. Forexample, the CA signals may be collected over a sensing vector definedbetween a combination of electrodes provided on the housing of the ICMor leadless device, where the sensing vector represents a far fieldsensing vector as the ICM or leadless device is implanted remote from anatrium of the heart.

At 304, one or more processors analyze the CA signals to identify anR-wave characteristic of interest (COI). For example, the R-wave COI mayrepresent a peak of the R-wave or some other characteristic of themorphology of the R-wave. As one nonlimiting example, the R-wave COI maybe identified utilizing the methods and systems described in co-pendingapplication entitled “METHOD AND SYSTEM TO DETECT R-WAVES IN CARDIACACTIVITY SIGNALS” (filed Jun. 13, 2018 Ser. No. 16/007,878), thecomplete subject matter which is expressly incorporated herein byreference in its entirety.

At 305, the one or more processors subtract a mean for the template fromthe subsegment correlation values. The subtraction operation at 305 mayoptionally be performed or omitted. When the subtraction is performed,the process subtracts the 1) mean of the template and 2) CA signalscorrelated with the template, so that x_(i) and y_(i) are rendered zeromean functions.

At 306, the one or more processors apply a P-wave template to at leastone subsegment of the CA signals. For example, the one or moreprocessors overlap a P-wave search window onto a segment of the CAsignals. The P-wave search window is longer than the P-wave template andthus, the segment of CA signals overlaid by the P-wave search windowincludes multiple sub segments having a length corresponding to theP-wave template. The P-wave search window is aligned at a desired pointin time that precedes the R-wave. For example, the P-wave search windowmay be positioned to begin approximately 350 ms prior to the peak of theR-wave. As another nonlimiting example, the P-wave search window may bepositioned to precede the R-wave such that the search window isgenerally centered at a point in time between 70 to 200 ms prior to thepeak of the R-wave. The width of the P-wave search window may be varied,such as beginning 30 ms before an expected location of the P-wave andcontinuing 30 ms after the expected location of the P-wave. A longer orshorter window may be defined.

In the foregoing manner, the processors utilize the R-wave peak to learnwhere the P-wave is expected to occur. As explained herein, the searchfor the actual P-wave analyzes subsegments of the P-wave search windowbeginning some desired interval before, and continuing a desiredinterval after, the point in time corresponding to the expected locationof the P-wave. By positioning a P-wave search window in the foregoingmanner, in accordance with aspects herein, computational burden isreduced and computational deficiency is improved by finding the R-waveand then searching subsegments along the limited duration of the searchwindow for the P-wave, as opposed to all or a larger portion of the CAsignals.

Optionally, the identifying operation at 304 may be omitted entirely andthe P-wave search window may be applied continuously across an entireduration of the CA signals, without limit to a particular time regionpreceding an R-wave. In this alternative embodiment, the process maycontinuously search for P-waves. When a P-wave is identified, the P-wavemarker may be recorded at the corresponding point in time along the CAsignals. Separately, R-waves may be identified, and R-wave markersstored with the CA signals to show P-wave and R-wave dis-association,such as consistent with complete heart block, AF and other arrhythmias.

Additionally or alternatively, the operations at 302-306 may be repeatedto form an ensemble of CA signals from multiple beats that fall withincorresponding P-wave search windows. When a P-wave is exceedingly small,it becomes more difficult to detect some of the P-waves, because theP-wave is lost in noise. In accordance with new and unique aspectsherein, this problem is at least partially overcome by increasing thesignal-to-noise (S/N) ratio by ensemble averaging the P-wave withoutunduly increasing processing complexity. If the noise is truly randomand uncorrelated, the average of the noise will approach zero. Ensembleaveraging increases the S/N ratio by the square root of the number ofelements in the ensemble as shown in equation 3.

$\begin{matrix}{\left( \frac{S}{N} \right)_{n} = {\sqrt{n}\left( \frac{S}{N} \right)_{i}}} & \left. {{Equation}\mspace{20mu} 3} \right)\end{matrix}$

For example, if an algorithm averages P-waves of 11-microvolt amplitudein a 16-element ensemble, the signal averaged P-wave has effectively thesame signal quality possessed by 40-microvolt P-wave. The process forsignal averaging is to first identify a R-wave and then toretrospectively average the elements in a window (e.g., 300 to 400 mswindow prior to the R-wave. Next the process compares the ensembleaveraged P-wave, to a signal averaged P-wave template using thecorrelation and amplitude criteria calculated using equation 1) and 2).A high-quality template can be acquired by an operator using analgorithm that performs ensemble averaging (e.g., 16 or more P-waves).The process applies the methods of adaptive templates to differentpostures and heart rates and re-establishes the template(s) bycontinuously updating the template(s) automatically as described above.

Utilizing ensemble averaged P-waves is relatively computationallyefficient. For each R-wave, an algorithm adds the preceding P-wave to arunning average P-wave. This may require as few as 13 additions percardiac cycle. This is a relatively modest demand on the processor.

In accordance with new and unique aspects herein, it has been recognizedthat a P-wave ensemble may be constructed utilizing a relatively smallnumber of digitized data samples. A limited number of digitized datasamples may be collected from each individual CA signal segment and thenadded to the ensemble average. Embodiments herein utilize very few datasamples (e.g., as few as four samples per P-wave search window) or asmany more samples as appropriate to achieve a desired S/N ratio orfrequency of P-wave verification. The number of digitized data samplesper CA signal segment may be relatively limited because, among otherthings, P-waves have relatively low frequency content below 20 Hz.Therefore, sampling at 64 samples per second should provide adequatecapture of the P-wave. Furthermore, as the algorithm predicts theexpected occurrence of the P-wave peak relative to the R-wave, thensampling 100 ms on either side of the peak provides a window thatcaptures the entire P-wave. Averaging is achieved with as few as 13samples added to the ensemble average per cardiac cycle.

Optionally, the ensemble averaging may be implemented in hardware, suchas through one or more averaging registers that are utilized to collectcorresponding CA data samples (e.g., 4-20) for one cardiac beat andcombine the CA data samples from an ensemble of cardiac beats, withoututilizing a processor and software to implement the averaging. Whenimplemented in hardware, a software algorithm implementer need not beset up.

At 308, the one or more processors apply the P-wave template to at leastone subsegment of the CA signals to obtain an alignment indicator. Inthe embodiment of FIG. 3A, the one or more processors apply a P-wavetemplate to sub-segments of the CA signals along the P-wave searchwindow to obtain a temporal alignment (TA) indicator across the P-wavesearch window. For example, the one or more processors correlate aP-wave template to a subsegment of the segment of CA signals within theP-wave search window to obtain a subsegment correlation value. Inaccordance with the operations at 308-316, the correlation isiteratively performed for subsegments of the CA signals along the P-wavesearch window to obtain a TA indicator (e.g., correlation function)defined by a collection of corresponding subsegment correlation values.The collection of subsegment TA indicator values define a functionacross the P-wave search window indicating a degree of temporalcorrelation between the P-wave template and a corresponding subsegmentof the CA signals. The correlation function represents a temporalalignment indicator indicative of a level or degree of temporalalignment between the template and the CA signals. FIGS. 5 and 6 showexamples of CA signals temporal alignment (correlation functions) andamplitude dependence indicators (covariance functions) with respect to aselect P-wave template.

By way of example, the one or more processors may apply a Pearson's rcorrelation algorithm or other correlation measurements such as Kendellor Spearman correlations. The one or more processors align the templateover a time range and perform the calculation shown in Equation 1:

$\begin{matrix}{r^{2} = {\frac{\sum{x_{i}y_{i}}}{\sqrt{\sum{x_{i}^{2}{\sum y_{i}^{2}}}}}.}} & {{Equation}\mspace{20mu} 1}\end{matrix}$

The variable x_(i) corresponds to the data samples within the CAsignals, while the variable y_(i) corresponds to values along thetemplate. Each value of Pearson's r, is calculated by applying Equation1 over a number of data samples corresponding to the width of the P-wavetemplate. For example, when the P-wave template includes 50 data points,each value of r is collected by applying Equation 1 over i=1 to i=50,for the current subsegment of 50 data samples from the CA signalsaligned with the P-wave template. Each time the template is shiftedalong the CA signals, a new value for r is calculated, again by steppingthrough the range of i=1 to i=50 to apply the P-wave template to thecurrent subsegment of CA signals. The operations at 308 are repeated toapply equation 1 at every point in time for each sample of the CA signalin the current subsegment over the width of the template. When thetemplate overlaps with the P-wave, the correlation approaches 1. Whenthe template overlaps noise, the correlation approaches a valuesignificantly lower than 1 (e.g., 0.8) to even −1. The width of thetemplate may be varied but is typically about 50 data samples when thesampling rate is 500 Hz or 512 Hz.

Optionally, the temporal alignment indicator may be determined in othermanners when applying the P-wave template to the CA signals. By way ofexample, the TA indicator may be determined based on a root mean square(RMS) function which represents an error-based template matchingrelation between the P-wave template and subsegments of the CA signals.Temporal alignment is achieved when the RMS error is minimized.Different functions for calculating a TA indicator may be utilizeddepending upon the nature of the underlying CA signals, such as whetherthe CA signals exhibit baseline drift or not. An alternative to the RMSerror is to sum absolute value of the difference of each point in thecandidate P-wave and the template. Choice of TA indicator is primarilyinfluenced by computational efficiency.

Optionally, the applying operation at 308 may be performed in connectionwith an ensemble average (as explained below in connection with FIG.3B). For example, the applying the P-wave template to the sub-segmentsof the CA signals may further comprise: i) identifying an R-wave COIfrom one or more beats in the series of beats; ii) applying the P-wavesearch window to the sub-segments of the CA signals prior the R-wave COIfor the one or more beats; iii) performing an ensemble average of the CAsignals within the P-wave search window for the one or more beats; andiv) calculating a correlation of the ensemble average with the P-wavetemplate to obtain the TA indicator.

At 312, the one or more processors analyze the temporal alignmentindicator based on a first criteria. For example, the first criteria maybe a largest peak in the correlation function across the CA signals inthe search window. For example, the one or more processors determinewhether a peak of the correlation function at the present point in timeexceeds a correlation threshold and exceeds a prior “best” (e.g.,largest) subsegment correlation peak. If the peak of the currentcorrelation function does not exceed a correlation threshold and/or doesnot a prior best subsegment correlation peak, flow moves to 314. If thepeak of the current correlation function exceeds a correlation thresholdand exceeds a prior best subsegment correlation peak, flow moves to 313,where the current peak is saved as the new best/largest peak of thecorrelation function. At 313, the locate within the CA signals,corresponding to the new peak, is also saved as a new peak location. At313, the one or more processors track a desired (e.g., best, closest orlargest) temporal alignment indicator within the P-wave search window.Flow continues to 314.

At 312, a threshold is used to avoid saving too low/small of a peakvalue. Optionally, the threshold may be omitted entirely, and thedecision at 312 based solely on the comparison to a prior best peak.

As a nonlimiting example, the correlation threshold may be 0.75. Thethreshold may be preprogrammed and/or may be automatically updated basedon subsegment correlation values calculated over time. For example, overtime, it may be determined, manually or automatically, that acorrelation threshold of 0.75 results in under-detection or over-sensingof P-waves. Based thereon, the correlation threshold may be decreased orincreased, manually or automatically. Additionally or alternatively, thecorrelation threshold may be defined as a function of a moving averageof correlation peaks for actual P-waves that are identified inaccordance with embodiments herein. For example, over time, an averagefor correlation peaks for X actual P-waves may be determined and thecorrelation threshold set to be a percentage of the average (e.g., 80%)or by subtracting a predetermined amount from the average (e.g., average−0.25).

At 314, the one or more processors determine whether the analysis shouldbe repeated for the next subsegment of the CA signals within the searchwindow.

When the processor determines to repeat the analysis for the nextsubsegment, flow continues to 316. At 316, the one or more processorsshift the P-wave template along the CA signals to the next subsegmentstart time. For example, the P-wave template may be shifted forward onesample, five samples or in other predetermined number of samples.Additionally or alternatively, the P-wave template may be shiftedforward by a predetermined amount of time. Additionally oralternatively, the P-wave template may be shifted forward based oncontent of the prior subsegment. For example, a prior subsegment mayexhibit a certain amount of correlation at a point in time and/or datasample. Based on the amount of correlation in the prior subsegment, theP-wave template may be shifted forward to have some level of alignmentwith respect to the correlation at the point of in time of interest inthe prior subsegment.

From 316, flow returns to 308 where the P-wave template is correlated tothe CA signals within the new subsegment. The operations at 308-316 arerepeated, until the decision is made at 314 to stop repeating. Forexample, the end of the search window may have been reached, in whichcase no further sub segments exist to be analyzed.

Alternatively, other reasons may be utilized to decide when to stopanalyzing sub segments of the CA signals. By way of example, the one ormore processors may determine that a P-wave is not present. Inaccordance with at least some embodiments, when a P-wave is absent froman expected location, in combination with an undue level of RRvariability, the process may declare an atrial fibrillation (AF)episode. When excessive RR interval variability is present and P-wavesare absent, among other things, the one or more processors may increasethe specificity of the process. For example, the specificity may beincreased by changing one or more sensing thresholds, as well asadjusting one or both of the first and second criteria.

Returning to 314, when the one or more processors determined that nomore subsegments should be analyzed, flow skips to 318. The operationsat 308-316 identify the first criteria as a maximum for the TA indicatorover the P-wave search window, wherein the candidate P-wave correspondsto the subsegment of the CA signal for which the corresponding TAindicator has the maximum

At 318, the one or more processors designate a candidate P-wave based ontemporal alignment indicator saved at 313. The candidate P-waverepresents the subsegment within the P-wave search window that satisfiedthe criteria 1 at 312 and was last saved at 313. The candidate P-wavemay represent a P-wave peak or morphology that exhibits a desired degreeof correlation to the P-wave template as designated by the temporalalignment indicator.

At 320, the one or more processors calculating an amplitude dependence(AD) indicator based on the temporal alignment indicator. The ADindicator is indicative of a level or degree of amplitude match betweenthe candidate P-wave AD indicator and the P-wave template AD indicator.For example, the AD indicator may represent a covariance function basedon the numerator of the correlation function. The AD indicator (e.g.,covariance function) is used as a second criteria that is calculated bythe one or more processors. The second criteria measures the amplitudeof the CA signals in relation to the P-wave template. For example, thecovariance function may represent a covariance amplitude for acorresponding subsegment of the CA signals. With reference to equation1, the numerator, Σx_(i)y_(i), represents the covariance between thetemplate and the corresponding subsegment of the CA signals. If thecovariance is divided by root mean square value of the template,√{square root over (Σy_(i) ²)}, the results is equation 2:

$\begin{matrix}{\;{{covamp} = {\frac{\sum{x_{i}y_{i}}}{\sqrt{\sum y_{i}^{2}}}.}}} & \left. {{Equation}\mspace{20mu} 2} \right)\end{matrix}$

The covamp measures the amplitude of the CA signals and thecorresponding subsegment in relation to the template. At 320, the one ormore processors calculate covamp at each data point (corresponding to aparticular point in time) along the current corresponding subsegment ofCA signals. For any given template √{square root over (Σy_(i) ²)}, is aconstant. Consequently, normalizing the covariance by the root meansquare value of the template in not necessary but is convenient forcomparison purposes.

At 322, the one or more processors compare the AD indicator with asecond criteria. For example, the one or more processors determinewhether the covariance function for the candidate P-wave is within atolerance range of a covariance threshold (e.g., a covariance amplitudepeak, also referred to as covampmax) for a reference P-wave (criteria2). The reference P-wave may represent the P-wave template used in thecorrelation analysis. The covampmax represents a magnitude of thecovariance amplitude (covamp) at the P-wave correlation peak. Thecovampmax may be calculated once when template is extracted or may beupdated by a moving average. By way of example, the tolerance range maybe 1.5×covampmax to about 0.5×covampmax. Additionally or alternatively,the covariance threshold (covampmax) may be automatically adapted todifferent values with respect to different postures.

When the AD indicator (e.g., covariance function) is not within thetolerance range, the one or more processors determine that both criteriahave not been satisfied for the current beat or ensemble of beats andthe candidate P-wave is declared invalid or a false P-wave and theprocess ends for the current beat or ensemble of beats. When the ADindicator (e.g., covariance function) is below a lower limit of thetolerance range, this is an indicator that there is a very low or noscaler relation of the amplitude of the P-wave template and the currentsub-segment. When the AD indicator (e.g., covariance function) is abovean upper limit of the tolerance range, this is an indicator that thescaler relation has exceeded an upper limit for total or optimalamplitude correlation between the P-wave template and the currentsubsegment, and thus some other error is present in the LA indicator,thereby justifying throwing out or disregarding the current candidateP-wave. When the AD (e.g., covariance function) is within the tolerancerange, the one or more processors determine that both criteria have beensatisfied for the current beat or ensemble of beats flow, moves to 324.

Optionally, the amplitude dependence indicator may be determined inmanners other than based on a covariance function, provided the functionaffords an indication of a relation between the amplitude of the P-wavetemplate and the amplitude of the candidate P-wave (identified at 318).Another amplitude criteria that may be used include using the root meansquared error between the template and the candidate P-wave (RMS error).When the RMS error is below a threshold then the algorithm deems thecandidate P-wave as an actual P-wave. An alternative to the RMS error isto sum absolute value of the difference of each point in the candidateP-wave and the template. Another alternative metric of amplitude is theRMS magnitude of the candidate P-wave. If the difference between the RMSof the Template and the RMS of the candidate P-wave, the P-wave isdeemed as an actual P-wave.

At 324, the one or more processors designate the candidate P-wave as anactual P-wave and record the designation of the actual P-wave. Inaccordance with the foregoing operations, embodiments herein identify atrue P-wave when both of the TA indicator and the AD indicator satisfy acorresponding threshold and range, respectively.

The foregoing operations at 308-322 are described in connection with asomewhat serial manner in which the TA indicator is obtained andanalyzed with respect to the first criteria first, followed by thecalculation of the AD indicator and comparison of the AD indicator tothe second criteria. Additionally or alternatively, the operation at308-322 may be implemented in parallel manner in which the TA indicatorand AD indicator are determined in parallel. The TA indicator and ADindicator are also compared in parallel to corresponding first andsecond criteria.

In some instances, the method of FIG. 3A may experience challenges whenrun in real time to find an optimal TA indicator. However, very goodalignment can be achieved using only the R-wave COI as a reference forsetting the preceding P-wave window from CA. The variation in the P-Rinterval is only about 5 to 10%. Consequently, an alternative approachmay be implemented.

FIG. 3B illustrates an alternative approach in accordance withembodiments herein. The operations of FIG. 3B are performed by one ormore processors. At 352, the one or more processors identify the R-waveCOI from a beat in a series of beats. At 354, the one or more processorsdefine the P-wave window to overlay the subsegment of the CA signals ata predetermined time prior to the R-wave COI for the corresponding beat.For example, the P-wave window may be set to overlay a subsegment of theCA signals that is Xms prior to the peak of the R-wave. At 356, the oneor more processors collect the subsegment of the CA signals overlaid bythe P-wave search window at 358, the one or more processors add thesubsegment collected at 356 to an ensemble of subsegments. At 360, then, the ensemble average segment counter is incremented. At 362, thenumber of P-wave segments added the ensemble is tested to see if itexceeds the number of desired segments, K, added to the ensemble. K mayvary from 1 or a relatively small number, such as when the P-waves arerelatively large and the signal to noise is relatively high.Alternatively, K may be set to a relatively large number, when P-wavesare very small or if noise is excessive. For example, the P-waveensemble may include 256 elements (K=256) resulting in dramaticallyenhancing the S/N ratio by 16×. Flow moves from 360 to back to 352, suchthat the identifying, defining and collecting operations are repeated apredetermined number of times (until n>K) to form an ensemble average ofthe CA signals within the P-wave search window for a series of beats.

Alternatively, at 362, when n>K, then the ensemble average has beencompleted. At 363, the one or more processors perform a correlationoperation in which the ensemble average is correlated with the P-wavetemplate. The completed ensemble is correlated to the P-wave template at363. The correlation represents an alignment indicator indicative ofwhether the ensemble of segments have a shape that is aligned with ashape of the P-wave template. At 364, the one or more processors analyzethe alignment indicator based on a first criteria. For example, the oneor more processors test the alignment indicator (correlation) todetermine if the alignment indicator meets or exceeds a threshold (thefirst criteria). By way of example, the threshold may be set to 0.8.When the alignment indicator (correlation) does not exceed thethreshold, flow moves to 365. At 365, the ensemble buffer is set to zero(n=0) in the operations at 352-364 repeated for the next series ofbeats.

Alternatively, when the alignment indicator satisfies the firstcriteria, namely when the correlation exceeds the threshold, flow movesto 370 at 370, the one or more processors calculate an amplitudedependence (A/D) indicator (covamp) by simply multiplying thecorrelation by √{square root over (Σx_(i) ²)}. This result isrepresented in Equation 2. At 372, the one or more processors comparethe AD indicator to a second criteria. For example, the covamp is testedto determine if it is within the tolerance range for an AD indicator. Ifthe AD indicator does not satisfy the second criteria, the currentcandidate P-wave is determined to not be an actual P-wave, and flowmoves from 372 back to 365 where the ensemble buffer is reset to zero.

Alternatively, at 372, if the covamp is within range, flow moves to 374.At 374, the one or more processors determined that the P-wave ensembleis accepted as an actual P-wave. Thereafter, at 365, n is set to zeroand the ensemble average is zeroed out. The process of FIG. 3Billustrates an alternative approach that is well suited to beimplemented in real time.

FIG. 4 illustrates a process for acquiring one or more P-wave templatesin accordance with embodiments herein. The process of FIG. 4 may beimplemented by one or more processors of an ICM, an external device, aphysician's programmer and/or at a remote server. For example, theP-wave templates may be generated by a physician's programmer during apatient physician visit, and/or based on historical information aboutthe current patient and/or a patient population. As another example, theP-wave template may be generated by the ICM in response to aninstruction received from an external device, periodically (e.g., once amonth while the patient is asleep) and/or based on arrhythmiadeterminations made by the ICM. For example, the ICM may automaticallyinitiate a process to obtain new P-wave templates when an ICM does notidentify any new arrhythmias for an extended period of time and/orcontinuously identifies arrhythmias for an extended period of time,either of which may be related to under-sensing or over-detectingP-waves. The process of FIG. 4 may be applied real time during theinitial in clinic setup and/or continuously on a day-by-day basis. Theprocess of FIG. 4 may create different averaged templates for individualdesignated postures and/or heart rate ranges. FIG. 4 may be implementedwith other types of IMDs, not just ICMs.

At 402, the one or more processors collect and display surfaceelectrocardiogram (EKG) signals and CA signals collected by animplantable medical device, such as an intracardiac electrogram (IEGM).For example, a set of surface electrodes may be attached to a patientfrom which the surface EKG signals are collected, while the ICMsimultaneously collects CA signals (IEGM) from implanted electrodes. Thesurface EKG signals and ICM CA signals are co-displayed (e.g., on aprogrammer or other external device). It is recognized that thecollection of the surface EKG signals and ICM CA signals may occur at anearlier point in time, with both sets of signals subsequently displayedto a physician. For example, the EKG and CA signals may be collected atone point in time (e.g., at home while a patient follows a predeterminedseries of instructions or during a clinical visit with the assistance ofmedical personnel). At the same time or at a later time, the same ordifferent physician (at the same location or at a different remotelocation) may then analyze the EKG and CA signals.

At 404, in connection with the physician's analysis of the EKG and CAsignals, the physician enters an input designating informationindicative of P-waves. For example, the one or more processors of aprogrammer or other external device may receive an input from a userthat designates at least one of: 1) P-waves in intracardiac electrogram(IEGM) signals collected by an implantable medical device (IMD), 2)P-waves in surface EKG signals and on the IEGM signals, and 3) P-waveson surface EKG signals. For example, a clinician may use a graphicaluser interface to select points corresponding to P-waves along in EKGstrip and/or the IEGM. In connection there with, the one or moreprocessors identify the segment of the IEGM that includes thecorresponding P-waves. For example, the one or more processors maycenter a P-wave window over the point in time at which the physician hasdesignated each P-wave. The window may have a predetermined width or maybe adjustable in width by the user.

At 406, the one or more processors automatically analyze the IEGMsignals (CA signals) within the window for the time period correspondingto the user input. For example, when the user designates the P-wavesdirectly on the ICM CA signals, the analysis may simply record the datapoints along the P-wave window from the ICM CA signals. Additionally oralternatively, when user designates the P-waves directly on the ICM CAsignals as well as on the surface EKG signals, the analysis may includethe additional operation of aligning the P-wave window based on bothsources of user inputs. Additionally or alternatively, when the userdesignates to P-waves only on the surface EKG signals, the analysis mayinclude identifying a corresponding P-wave window to align over the ICMCA signals. The P-wave window is aligned on the ICM CA signalscontemporaneous in time with the P-wave designated on the surface EKGsignals. It is recognized that additional operations may be performed inthe analysis, such as filtering of the signals, removal of noise and thelike.

At 408, the one or more processors determine whether to repeat theoperations at 402-406 in connection with additional cardiac beats. Ifso, flow returns to 402 and the operations at 402-406 are repeated tocollect an ensemble of P-waves from ICM CA signals. Once the desirednumber of cardiac beats are analyzed, flow moves from 408 to 410.

At 410, the one or more processors combined the collection of P-wavesfrom the CA signals utilizing a desired mathematical function to form aP-wave ensemble. For example, the collection of P-waves may be combinedthrough averaging, weighted averaging and the like.

At 412, an optional operation may be added. At 412, the one or moreprocessors may modify the P-wave template by adding a current P-waveand/or one or more recent P-waves. For example, when ensemble averagingis utilized to form a P-wave template, the ensemble average may includeone or more recent P-waves that have been identified.

At 414, the one or more processors determine whether to repeat theoperations of 402-412 in connection with additional patient posturepositions and/or different heart rates. For example, the operations at402-412 may be implemented while a patient is standing, while a patientis sitting, while a patient is lying on his/her back, while a patient islying on each side, and the like. As another example, the operations of402-412 may be implemented to collect different templates for differentheart rate ranges. By repeating the process of FIG. 4 in connection withdifferent posture positions and/or heart rate ranges, embodiments hereinallow for different templates to be developed in connection withdifferent postures and different heart rate ranges.

Additionally or alternatively, the operations of FIG. 4 may beimplemented separately in order to account for migration and othermovement of an ICM within an implantation pocket. For example, when ICMis implanted in a pectoral area, over time, the ICM may rotate alongvarious axes and thus become oriented differently within a patient,relative to different postures. For example, at the time of implant, anICM may be substantially oriented vertically while a patient is standingup and substantially oriented horizontally while a patient is lyingdown. However, overtime the ICM may migrate within the pocket such that,when a patient is standing up or lying down, the ICM is no longer in theoriginal corresponding vertical or horizontal orientation. Accordingly,the operations of FIG. 4 may be repeated when the potential exists thatan ICM has migrated, to acquire one or more new templates.

Optionally, embodiments herein may be implemented with devices otherthan ICMs, such as a subcutaneous ICD, a transvenous ICD, a leadlessdevice, and the like. The template acquisition process of FIG. 4 may berepeated in connection with each of the foregoing types of implantablemedical devices at different points in time throughout the life of themedical device. For example, a subcutaneous patch may shift, experiencescar tissue growth or otherwise experience changes that warrantcollection of new templates. Similarly, a transvenous ICD or a leadlessdevice may also experience changes over time (e.g., growth of scartissue at electrodes, shifts and electrode position) that warrantacquisition of new templates. Finally, regardless of the implantabledevice, it may be desirable to acquire new templates, simply when apatient's physiologic behavior changes over time.

FIG. 5 illustrates a first example of a CA signal, a TA indicator (e.g.,correlation function) and AD indicator (e.g., covariance function)determined in accordance with embodiments herein. The CA signal 500 iscollected by an ICM. The CA signal 500 includes R-waves 501, a T-wave505 and a P-wave 503. The T-wave 505 has a wide wave shape, while theP-wave 503 is extremely diminutive or arguably indiscernible. The bottomtracing 511 is the correlation of the CA signal 500 and a P-wavetemplate. At the point labelled as 509, the correlation value isapproximately 0.95. The middle tracing 507 represents across-correlation between the P-wave template and the CA signal dividedby the root mean square value of the P-wave template. The point 508 isthe location at which the covamp is measured.

FIG. 6 illustrates a second example of a CA signal, correlation functionand covariance function determined in accordance with embodimentsherein. The CA signal 600 is collected by an ICM. The CA signal 600includes R-waves 601. The bottom tracing 611 is the correlation of theCA signal 600 and a P-wave template. The middle tracing 607 represents across-correlation between the P-wave template and the CA signal dividedby the root mean square value of the P-wave template. The vertical lines602 and 604 represent the points at which a P-wave is identified. Againnote that the P-wave is very small and cannot easily be identified onthe top CA signal trace, but the algorithms described herein stilllocate the P-waves. At 602 and 604, the correlation function has valuesof 0.91 and 0.75, respectively, while the cross-correlation functionexhibits a slight increase.

FIGS. 7A-7C illustrate example P-wave templates that may be derived fordifferent patients in accordance with embodiments herein. Note thesignatures are quite different. An algorithm can simply include selectedP-waves into a moving average to create an average template. An averagetemplate is superior to using a single operator selected template. Thisprocess may be applied real time during the initial in clinic setupand/or continuously on a day-by-day basis. An algorithm may createdifferent averaged templates for each designated posture.

FIG. 9 illustrates a system level diagram indicating devices andnetworks that may utilize the methods and systems herein. For example,an implantable cardiac monitoring device (ICM) 902 may be utilized tocollect a cardiac activity data set, including identification of falseversus actual the P waves in accordance with embodiments herein. The ICM902 adds P-wave markers to the CA data set in connection withvalid/actual P waves. Optionally, the ICM 902 may collect informationregarding false P waves there were identified by alternative detectionand confirmation algorithms implemented within the ICM. The ICM 902 maysupply the CA data set (CA signals and DD feature markers) to variouslocal external devices, such as a tablet device 904, a smart phone 906,a bedside monitoring device 908, a smart watch and the like. The devices904-908 include a display to present the various types of CA signals,markers, statistics, diagnostics and other information described herein.The ICM 902 may convey the CA data set over various types of wirelesscommunications links to the devices 904, 906 and 908. The ICM 902 mayutilize various communications protocols and be activated in variousmanners, such as through a Bluetooth, Bluetooth low energy, Wi-Fi orother wireless protocol. Additionally or alternatively, when a magneticdevice 910 is held next to the patient, the magnetic field from thedevice 910 may activate the ICM 902 to transmit the cardiac activitydata set and AF data to one or more of the devices 904-908.

The processes described herein for analyzing the cardiac activitysignals to identify P waves, may be implemented on one or more of thedevices 904-908. Additionally or alternatively, the ICM 902 may alsoimplement the processes described herein. The devices 904-908 maypresent the CA data set and AF detection statistics and diagnostics toclinicians in various manners. As one example, AF markers may beillustrated on EGM signal traces. AF, P-wave, R-wave and other sinusmarkers may be presented in a marker channel that is temporally alignedwith original or modified CA signals. Additionally or alternatively, theduration and heart rate under AF may be formatted into histograms orother types of charts to be presented alone or in combination with CAsignals.

FIG. 10 illustrates a distributed processing system 1000 in accordancewith embodiments herein. The distributed processing system 1000 includesa server 1002 connected to a database 1004, a programmer 1006, a localmonitoring device 1008 and a user workstation 1010 electricallyconnected to a network 1012. Any of the processor-based components inFIG. 10 (e.g., workstation 1010, cell phone 1014, local monitoringdevice 1016, server 1002, programmer 1006) may perform the processesdiscussed herein.

The network 1012 may provide cloud-based services over the internet, avoice over IP (VoIP) gateway, a local plain old telephone service(POTS), a public switched telephone network (PSTN), a cellular phonebased network, and the like. Alternatively, the communication system maybe a local area network (LAN), a medical campus area network (CAN), ametropolitan area network (MAN), or a wide area network (WAM). Thecommunication system serves to provide a network that facilitates thetransfer/receipt of data and other information between local and remotedevices (relative to a patient). The server 1002 is a computer systemthat provides services to the other computing devices on the network1012. The server 1002 controls the communication of information such ascardiac activity data sets, bradycardia episode information, asystoleepisode information, AF episode information, markers, cardiac signalwaveforms, heart rates, and device settings. The server 1002 interfaceswith the network 1012 to transfer information between the programmer1006, local monitoring devices 1008, 1016, user workstation 1010, cellphone 1014 and database 1004. The database 1004 stores information suchas cardiac activity data, AF episode information, AF statistics,diagnostics, markers, cardiac signal waveforms, heart rates, devicesettings, and the like, for a patient population. The information isdownloaded into the database 1004 via the server 1002 or, alternatively,the information is uploaded to the server 1002 from the database 1004.The programmer 1006 may reside in a patient's home, a hospital, or aphysician's office. The programmer 1006 may wirelessly communicate withthe ICM 1003 and utilize protocols, such as Bluetooth, GSM, infraredwireless LANs, HIPERLAN, 3G, satellite, as well as circuit and packetdata protocols, and the like. Alternatively, a telemetry “wand”connection may be used to connect the programmer 1006 to the ICM 1003.The programmer 1006 is able to acquire ECG 1022 from surface electrodeson a person (e.g., ECGs), electrograms (e.g., EGM) signals from the ICM1003, and/or cardiac activity data, AF episode information, AFstatistics, diagnostics, markers, cardiac signal waveforms, atrial heartrates, device settings from the ICM 1003. The programmer 1006 interfaceswith the network 1012, either via the internet, to upload theinformation acquired from the surface ECG unit 1020, or the ICM 1003 tothe server 1002.

The local monitoring device 1008 interfaces with the communicationsystem to upload to the server 1002 one or more of cardiac activity dataset, AF episode information, AF statistics, diagnostics, markers,cardiac signal waveforms, heart rates, sensitivity profile parametersettings and detection thresholds. In one embodiment, the surface ECGunit 1020 and the ICM 1003 have a bi-directional connection 1024 withthe local RF monitoring device 1008 via a wireless connection. The localmonitoring device 1008 is able to acquire cardiac signals from thesurface of a person, cardiac activity data sets and other informationfrom the ICM 1003, and/or cardiac signal waveforms, heart rates, anddevice settings from the ICM 1003. On the other hand, the localmonitoring device 1008 may download the data and information discussedherein from the database 1004 to the surface ECG unit 1020 or the ICM1003.

The user workstation 1010 may be utilized by a physician or medicalpersonnel to interface with the network 1012 to download cardiacactivity data and other information discussed herein from the database1004, from the local monitoring devices 1008, 1016, from the ICM 1003 orotherwise. Once downloaded, the user workstation 1010 may process the CAdata in accordance with one or more of the operations described above.The user workstation 1010 may upload/push settings (e.g., sensitivityprofile parameter settings), ICM instructions, other information andnotifications to the cell phone 1014, local monitoring devices 1008,1016, programmer 1006, server 1002 and/or ICM 1003. For example, theuser workstation 1010 may provide instructions to the ICM 1003 in orderto update sensitivity profile parameter settings when the ICM 1003declares too many false AF detections.

The processes described herein in connection with analyzing cardiacactivity data for detecting R-waves/noise and for confirming orrejecting AF detection may be performed by one or more of the devicesillustrated in FIG. 10, including but not limited to the ICM 1003,programmer 1006, local monitoring devices 1008, 1016, user workstation1010, cell phone 1014, and server 1002. The process described herein maybe distributed between the devices of FIG. 10.

The systems of FIGS. 9 and 10 may be implemented in connection withcalculating P-wave templates as described herein. For example, the CAsignals represent intracardiac electrograms (IEGM), one or more of thedevices, phones, workstations, servers and the like in FIGS. 9-10 mayinclude a display configured to display on a graphical user interface(GUI) IEGM signals and surface electrocardiogram (EKG) signals. One ormore of the devices, phones, workstations and the like may receive auser input from the GUI an input designating at least one of: 1) P-waveson the IEGM signals, 2) P-waves on surface EKG signals and P waves onthe IEGM signals, or 3) P-waves on the surface EKG signals. The userinput designates select points corresponding to the P-waves. The one ormore of the devices, phones, workstations, servers and the like identifythe segment of the CA signals that includes the corresponding P-waves.

The systems and devices of FIGS. 9 and 10 may repeat the displaying,receiving and identifying to calculate a plurality of P-wave templatesassociated with different postures and utilizing a select one of theP-wave templates based on a current posture of the patient when the CAsignals are collected. The systems and devices of FIGS. 9 and 10 maycalculate separate P-wave templates corresponding to a patient standing,the patient sitting, the patient lying on his/her back, and the patientlying on each side.

Application of Current P-Wave Detection Embodiments within OtherMonitoring, Detection and Therapy Processes

The P wave detected processes described in accordance with embodimentsherein may be integrated into and utilized with various monitoringprocesses, arrhythmia detection processes, therapy delivery processesand the like.

FIG. 11A illustrates a process in which the P-wave detection processesdescribed herein may be implemented in connection with detectingarrhythmia episodes, including, but not limited to, syncope, bradycardiaand atrial fibrillation (AF) episodes. At 1102, an arrhythmia detectionalgorithm monitor CA signals to identify arrhythmia episodes. Asnonlimiting examples, one or more processors of an implantable medicaldevice may collect CA signals, identify in R-wave Cal in connection witheach beat (e.g., a peak of an R-wave) and measure RR intervals betweensuccessive R wave COIs. The one or more processors may then analyzevariations in the RR intervals between successive R waves. Based atleast in part on variability of the RR intervals, the one or moreprocessors may declare an arrhythmia episode (e.g., syncope, bradycardiaand AF episodes). By way of example, the arrhythmia detection operation1102 may be implemented in accordance with one or more of the methodsand systems described in the following co-pending applications (all ofwhich are expressly incorporated herein by reference in theirentireties): U.S. patent application Ser. No. 15/973,126, titled “METHODAND SYSTEM FOR SECOND PASS CONFIRMATION OF DETECTED CARDIAC ARRHYTHMICPATTERNS”; U.S. patent application Ser. No. 15/973,351, titled “METHODAND SYSTEM TO DETECT R-WAVES IN CARDIAC ARRHYTHMIC PATTERNS”; U.S.patent application Ser. No. 15/973,307, titled “METHOD AND SYSTEM TODETECT POST VENTRICULAR CONTRACTIONS IN CARDIAC ARRHYTHMIC PATTERNS”;and U.S. patent application Ser. No. 16/399,813, titled “METHOD ANDSYSTEM TO DETECT NOISE IN CARDIAC ARRHYTHMIC PATTERNS”. When a candidatearrhythmia episode is identified, a portion of the CA signals are storedat least temporarily in memory of the IMD. For example, when anarrhythmia episode is detected, a segment of EGM signals may be storedfor a predetermined period of time (e.g., 30 seconds, 1 minute, 5minutes, etc.). Additionally or alternatively, the duration of thesegment of EGM signals that is stored may be automatically determined.For example, EGM signals may be stored for a period of time beginning apredetermined number of beats preceding the beginning of an arrhythmiaepisode and continuing for a predetermined number of beats following anending of the arrhythmia episode. It is recognized that the storage ofthe EGM signals may be managed in various manners. Thereafter, flowmoves to 1104.

At 1104, the one or more processors initiate a P-wave under-sensingdiscriminator. The P-wave undersensing discriminator, among otherthings, implements a P-wave detection and confirmation process inaccordance with embodiments herein. For example, the P-wave undersensingdiscriminator may analyze the stored segment of EGM signals, among otherthings, by analyzing the beats within the segment of EGM signals forcandidate P waves. The P-wave undersensing discriminator then implementsthe methods and systems herein to detect and compare alignmentindicators and amplitude dependence indicators with correspondingcriteria to declare candidate P waves valid actual P waves or false Pwaves. The remaining operations of FIG. 11A further summarize one mannerin which the segment of EGM signals may be analyzed based on candidateand actual P waves. The P-wave under sensing discriminator at operation1104-1110 may be implemented in real time within an IMD while collectingreal-time CA signals and performing real time arrhythmia detection.Additionally or alternatively, the P-wave under sensing discriminator atoperations 1104-1110 may be implemented at a later point in timefollowing one or more candidate arrhythmia episodes. For example, thestored segments of EGM signals and the determinations of arrhythmiaepisodes may be downloaded from the IMD to an external device and/oroptionally to a remote server. FIGS. 9 and 10 illustrate nonlimitingexamples of configurations of local and remote external devices/serversthat may communicate with an implantable device to perform all orportions of the P-wave detection and discrimination processes describedherein, as well as numerous other operations. The local external deviceand/or remote server (or any other non-implantable computing device) maythen implement the P-wave under sensing discriminator by performing theoperations described herein in connection with FIGS. 1-10

At 1106, the one or more processors (IMD, local external device, remoteserver, etc.) analyze the segment of stored EGM signals, associated withthe candidate arrhythmia episode, to search for the presence ofconsistent P waves in search windows preceding the corresponding Rwaves. As a nonlimiting example, the EGM signals for a 30 second periodof time prior to declaration of the candidate arrhythmia episode may beanalyzed for P waves. One or more of the P-wave detection processesherein are applied across the segment of EGM signals, to detectcandidate P waves and then analyze the alignment and AD indicatorsrelative to first and second criteria to validate or reject thecandidate P waves. The actual P-waves are assigned corresponding P-wavemarkers. At 1106, the one or more processors determine whetherconsistent P waves are detected across the beats within the segment ofEGM signals. The determination for what constitutes “consistent” P wavesmay vary. For example, the process may determine that consistent P wavesare present when at least 80% of the beats exhibit an actual P-wave.Additionally or alternatively, the process may declare that consistent Pwaves are present when actual P waves are detected in X out of Y beats(e.g., 3 out of 4, 7 out of 8, etc.). When consistent P waves are notfound, flow moves to 1108. At 1108, the one or more processors validatesthe arrhythmia episode, namely the one or more processors interpret thelack of P waves as an indication that the arrhythmia detection algorithmcorrectly identified an arrhythmia episode. Alternatively, if consistentP waves are found at 1106, flow moves to 1110. At 1110, the one or moreprocessors reject the arrhythmia episode as false, namely the one ormore processors determine that the arrhythmia detection algorithm hasunder sensed P waves and rejects.

In accordance with new and unique aspects herein, methods and systemsare provided that collect CA signals, identify variability in RRintervals within a series of beats in the CA signals, declare anarrhythmia episode based on the variability in the RR intervals, store asegment of the CA signals for a series of beats in connection with thearrhythmia episode and implement a confirmation/rejection process basedon the determination of whether P waves have been under sensed. Theconfirmation/rejection process implements the P-wave detection processesand systems described herein. By way of example, methods and systemsiteratively implementing the applying, calculating, analyzing,comparing, and designating operations of FIGS. 3A and/or 3B to determinewhether actual P waves occur consistently throughout the series ofbeats; and the validate or reject the arrhythmia episode based on thedetermination of whether the actual P waves occur consistentlythroughout the series of beats.

Among other things, the P-wave detection comprises obtaining far fieldcardiac activity (CA) signals for a series of beats; applying a P-wavetemplate to at least one sub-segment of the CA signals to obtain analignment indicator; calculating an amplitude dependence (AD) indicatorbased at least in part on the P-wave template and the at least onesub-segment; analyzing the alignment indicator based on a firstcriteria; comparing the AD indicator with a second criteria; designatinga candidate P-wave to be an actual P-wave based on the analyzing andcomparing; and recording results of the designating (e.g., FIGS. 3A and3B).

Additionally or alternatively, the P-wave detection process and systemfurther comprises: identifying an R-wave COI from a beat in the seriesof beats; defining the P-wave search window to overlay the sub-segmentof the CA signals at a predetermined time prior to the R-wave COI forthe beat; collecting the subsegment of the CA signals overlaid by theP-wave search window; repeating the identifying, defining and collectingto obtain on ensemble of subsegments for the series of beats, combiningthe ensemble of subsegments to form an ensemble average of the CAsignals within the P-wave search window for the series of beats; andcalculating a correlation of the ensemble average with the P-wavetemplate to obtain the alignment indicator (e.g., FIG. 3B).

Additionally or alternatively, the P-wave detection process and systemperforms the applying operation by applying the P-wave template tosub-segments of the CA signals along a P-wave search window to obtain,as the alignment indicator (e.g., FIG. 3A), a temporal alignment (TA)indicator across the P-wave search window, and performs the analyzingoperation by analyzing the TA indicator based on the first criteria toidentify the candidate P-wave (e.g., FIG. 3A).

FIG. 11B illustrates an example for consistent P waves analyzed inaccordance with embodiments herein. A window 1120 of CA signalspreceding an AF trigger 1130 is illustrated, from which candidate P-wavesegments 1122-1125 are identified. The candidate P-wave segments1122-1125 are overlapped to form a candidate P-wave ensemble 1126. Thecandidate P-wave ensemble is then analyzed in accordance withembodiments herein. It is recognized that the illustration at 1126merely represents examples of various candidate P waves that may be thencombined to form an ensemble through various mathematical functions.

FIG. 11C illustrates alternative examples of groups of candidate P wavesthat may be combined. In panel 1140, the candidate P waves, whencombined, form an ensemble 1142 that would not satisfy the first and/orsecond criteria for a TA indicator and/or an AD indicator in accordancewith embodiments herein. Consequently, the ensemble 1142 would beclassified to not represent a P-wave ensemble and thus the AF episodewould be validated. In panel 1150, the candidate P waves, when combined,form an ensemble 1152 that would satisfy the first and second criteriafor the TA indicator and the AD indicator in accordance with embodimentsherein. Consequently, the ensemble 1152 would be classified to representa P-wave ensemble and thus the AF episode would be declared invalid.

Additionally or alternatively, the AF detection algorithm maydiscriminate AF based on a variability in the RR interval. When an AFdetection algorithm exhibits an excessive amount of variability in theRR interval, the P-wave detection processes herein may be implemented inconnection there with to determine whether a P-wave occurred precedingeach of the R waves used to determine the RR interval. When P waves donot precede the R waves, this may be taken as a further indication thatthe AF detection algorithm has incorrectly identified in R-wave (giventhat the R-wave is not preceded by a P wave).

The P-wave detection algorithms herein may be utilized in connectionwith other processes (not related to AF) for monitoring and detectingvarious physiologic states and delivering therapy. As one nonlimitingexample, the P-wave detection processes herein may be utilized incombination with assessing the left atrial pressure (LAP), such asdescribed in U.S. Pat. No. 8,600,487, titled “SYSTEM AND METHOD FOREXPLOITING ATRIAL ELECTROCARDIAC PARAMETERS IN ASSESSING LEFT ATRIALPRESSURE USING AN IMPLANTABLE MEDICAL DEVICE”, issuing Dec. 3, 2013, thecomplete subject matter of which is expressly incorporated by referenceherein in its entirety. For example, the P-wave detection processesherein may be utilized to detect a peak of the P-wave, and in connectionthere with calculating an intra-atrial conduction (IACD) delay andP-wave duration. In accordance with embodiments in the '487 patent, theIMD then tracks changes, if any, in the intra-atrial conduction delay,P-wave duration, and other parameters in connection with values measuredfor left atrial pressure. As nonlimiting examples, the P-wave detectionprocesses herein may be used to detect atrial parameters, such as theIACD delay and P-wave duration, in connection with FIG. 2 (operation102), FIG. 3A (operation 152), FIG. 4, (operation 202) FIG. 5 (operation256), and FIG. 6 in the '487 patent.

Additionally or alternatively, the P-wave detection processes describedherein may be implement it in connection with reducing false bradycardiadetection. For example, the P-wave detection processes herein may beutilized to adjust sensing threshold's to be applied in connection witheach episode to provide a more customized approach.

Additionally or alternatively, the P-wave detection processes describedherein may be implemented in connection with reducing false positivedetection. While false positive actions are often frequently due tounder sensed R waves, the P-wave detected in connection here with may beutilized to adjust sensing thresholds to provide a more customizedapproach. For example, when a positive is detected, a window may bedefined that precedes the pause. The P-wave detection process herein maybe implemented across the CA signals within the window to search for Pwaves that may be then utilized to better determine whether a pause hasin fact occurred.

Additionally or alternatively, the P-wave detection processes describedherein may be implement in connection with discriminating loss ofcontact, such as when an electrode on ICM loses contact with thesurrounding tissue. False pause detections due to loss of contact alsoexhibit a small characteristic noise signal. However, at times it may bedifficult to distinguish between a noise signal and a P-wave. The P-wavetemplates described herein may be applied across the window thatincludes the potential noise signal. When the criteria herein indicatethat the window includes an actual or true P-wave, the process maydetermine that there is no loss of contact. Alternatively, when thecriteria herein indicate that the window does not include an actual ortrue P-wave, the processes herein may be utilized to verify that thewindow does not in fact only include noise and therefore provide afurther confirmation that loss of contact has occurred.

CLOSING

The various methods as illustrated in the Figures and described hereinrepresent exemplary embodiments of methods. The methods may beimplemented in software, hardware, or a combination thereof. In variousof the methods, the order of the steps may be changed, and variouselements may be added, reordered, combined, omitted, modified, etc.Various of the steps may be performed automatically (e.g., without beingdirectly prompted by user input) and/or programmatically (e.g.,according to program instructions).

Various modifications and changes may be made as would be obvious to aperson skilled in the art having the benefit of this disclosure. It isintended to embrace all such modifications and changes and, accordingly,the above description is to be regarded in an illustrative rather than arestrictive sense.

Various embodiments of the present disclosure utilize at least onenetwork that would be familiar to those skilled in the art forsupporting communications using any of a variety ofcommercially-available protocols, such as Transmission ControlProtocol/Internet Protocol (“TCP/IP”), User Datagram Protocol (“UDP”),protocols operating in various layers of the Open System Interconnection(“OSI”) model, File Transfer Protocol (“FTP”), Universal Plug and Play(“UpnP”), Network File System (“NFS”), Common Internet File System(“CIFS”) and AppleTalk. The network can be, for example, a local areanetwork, a wide-area network, a virtual private network, the Internet,an intranet, an extranet, a public switched telephone network, aninfrared network, a wireless network, a satellite network and anycombination thereof.

In embodiments utilizing a web server, the web server can run any of avariety of server or mid-tier applications, including Hypertext TransferProtocol (“HTTP”) servers, FTP servers, Common Gateway Interface (“CGI”)servers, data servers, Java servers, Apache servers and businessapplication servers. The server(s) also may be capable of executingprograms or scripts in response to requests from user devices, such asby executing one or more web applications that may be implemented as oneor more scripts or programs written in any programming language, such asJava®, C, C# or C++, or any scripting language, such as Ruby, PHP, Perl,Python or TCL, as well as combinations thereof. The server(s) may alsoinclude database servers, including without limitation thosecommercially available from Oracle®, Microsoft®, Sybase® and IBM® aswell as open-source servers such as MySQL, Postgres, SQLite, MongoDB,and any other server capable of storing, retrieving and accessingstructured or unstructured data. Database servers may includetable-based servers, document-based servers, unstructured servers,relational servers, non-relational servers or combinations of theseand/or other database servers.

The environment can include a variety of data stores and other memoryand storage media as discussed above. These can reside in a variety oflocations, such as on a storage medium local to (and/or resident in) oneor more of the computers or remote from any or all of the computersacross the network. In a particular set of embodiments, the informationmay reside in a storage-area network (“SAN”) familiar to those skilledin the art. Similarly, any necessary files for performing the functionsattributed to the computers, servers or other network devices may bestored locally and/or remotely, as appropriate. Where a system includescomputerized devices, each such device can include hardware elementsthat may be electrically coupled via a bus, the elements including, forexample, at least one central processing unit (“CPU” or “processor”), atleast one input device (e.g., a mouse, keyboard, controller, touchscreen or keypad) and at least one output device (e.g., a displaydevice, printer or speaker). Such a system may also include one or morestorage devices, such as disk drives, optical storage devices andsolid-state storage devices such as random access memory (“RAM”) orread-only memory (“ROM”), as well as removable media devices, memorycards, flash cards, etc.

Such devices also can include a computer-readable storage media reader,a communications device (e.g., a modem, a network card (wireless orwired), an infrared communication device, etc.) and working memory asdescribed above. The computer-readable storage media reader can beconnected with, or configured to receive, a computer-readable storagemedium, representing remote, local, fixed and/or removable storagedevices as well as storage media for temporarily and/or more permanentlycontaining, storing, transmitting and retrieving computer-readableinformation. The system and various devices also typically will includea number of software applications, modules, services or other elementslocated within at least one working memory device, including anoperating system and application programs, such as a client applicationor web browser. It should be appreciated that alternate embodiments mayhave numerous variations from that described above. For example,customized hardware might also be used and/or particular elements mightbe implemented in hardware, software (including portable software, suchas applets) or both. Further, connection to other computing devices suchas network input/output devices may be employed.

Various embodiments may further include receiving, sending, or storinginstructions and/or data implemented in accordance with the foregoingdescription upon a computer-readable medium. Storage media and computerreadable media for containing code, or portions of code, can include anyappropriate media known or used in the art, including storage media andcommunication media, such as, but not limited to, volatile andnon-volatile, removable and non-removable media implemented in anymethod or technology for storage and/or transmission of information suchas computer readable instructions, data structures, program modules orother data, including RAM, ROM, Electrically Erasable ProgrammableRead-Only Memory (“EEPROM”), flash memory or other memory technology,Compact Disc Read-Only Memory (“CD-ROM”), digital versatile disk (DVD)or other optical storage, magnetic cassettes, magnetic tape, magneticdisk storage or other magnetic storage devices or any other medium whichcan be used to store the desired information and which can be accessedby the system device. Based on the disclosure and teachings providedherein, a person of ordinary skill in the art will appreciate other waysand/or methods to implement the various embodiments.

The specification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense. It will, however, beevident that various modifications and changes may be made thereuntowithout departing from the broader spirit and scope of the invention asset forth in the claims.

Other variations are within the spirit of the present disclosure. Thus,while the disclosed techniques are susceptible to various modificationsand alternative constructions, certain illustrated embodiments thereofare shown in the drawings and have been described above in detail. Itshould be understood, however, that there is no intention to limit theinvention to the specific form or forms disclosed, but on the contrary,the intention is to cover all modifications, alternative constructionsand equivalents falling within the spirit and scope of the invention, asdefined in the appended claims.

The use of the terms “a” and “an” and “the” and similar referents in thecontext of describing the disclosed embodiments (especially in thecontext of the following claims) are to be construed to cover both thesingular and the plural, unless otherwise indicated herein or clearlycontradicted by context. The terms “comprising,” “having,” “including”and “containing” are to be construed as open-ended terms (i.e., meaning“including, but not limited to,”) unless otherwise noted. The term“connected,” when unmodified and referring to physical connections, isto be construed as partly or wholly contained within, attached to orjoined together, even if there is something intervening. Recitation ofranges of values herein are merely intended to serve as a shorthandmethod of referring individually to each separate value falling withinthe range, unless otherwise indicated herein and each separate value isincorporated into the specification as if it were individually recitedherein. The use of the term “set” (e.g., “a set of items”) or “subset”unless otherwise noted or contradicted by context, is to be construed asa nonempty collection comprising one or more members. Further, unlessotherwise noted or contradicted by context, the term “subset” of acorresponding set does not necessarily denote a proper subset of thecorresponding set, but the subset and the corresponding set may beequal.

Operations of processes described herein can be performed in anysuitable order unless otherwise indicated herein or otherwise clearlycontradicted by context. Processes described herein (or variationsand/or combinations thereof) may be performed under the control of oneor more computer systems configured with executable instructions and maybe implemented as code (e.g., executable instructions, one or morecomputer programs or one or more applications) executing collectively onone or more processors, by hardware or combinations thereof. The codemay be stored on a computer-readable storage medium, for example, in theform of a computer program comprising a plurality of instructionsexecutable by one or more processors. The computer-readable storagemedium may be non-transitory.

All references, including publications, patent applications and patents,cited herein are hereby incorporated by reference to the same extent asif each reference were individually and specifically indicated to beincorporated by reference and were set forth in its entirety herein.

It is to be understood that the subject matter described herein is notlimited in its application to the details of construction and thearrangement of components set forth in the description herein orillustrated in the drawings hereof. The subject matter described hereinis capable of other embodiments and of being practiced or of beingcarried out in various ways. Also, it is to be understood that thephraseology and terminology used herein is for the purpose ofdescription and should not be regarded as limiting. The use of“including,” “comprising,” or “having” and variations thereof herein ismeant to encompass the items listed thereafter and equivalents thereofas well as additional items.

It is to be understood that the above description is intended to beillustrative, and not restrictive. For example, the above-describedembodiments (and/or aspects thereof) may be used in combination witheach other. In addition, many modifications may be made to adapt aparticular situation or material to the teachings of the inventionwithout departing from its scope. While the dimensions, types ofmaterials and physical characteristics described herein are intended todefine the parameters of the invention, they are by no means limitingand are exemplary embodiments. Many other embodiments will be apparentto those of skill in the art upon reviewing the above description. Thescope of the invention should, therefore, be determined with referenceto the appended claims, along with the full scope of equivalents towhich such claims are entitled. In the appended claims, the terms“including” and “in which” are used as the plain-English equivalents ofthe respective terms “comprising” and “wherein.” Moreover, in thefollowing claims, the terms “first,” “second,” and “third,” etc. areused merely as labels, and are not intended to impose numericalrequirements on their objects. Further, the limitations of the followingclaims are not written in means-plus-function format and are notintended to be interpreted based on 35 U.S.C. § 112(f), unless and untilsuch claim limitations expressly use the phrase “means for” followed bya statement of function void of further structure.

What is claimed is:
 1. A system for detecting P-waves in cardiacactivity, comprising: memory to store specific executable instructions;one or more processors configured to execute the specific executableinstructions for: obtaining far field cardiac activity (CA) signals fora series of beats; applying a P-wave template to at least onesub-segment of the CA signals to obtain an alignment indicator;calculating an amplitude dependence (AD) indicator based at least inpart on the P-wave template and the at least one sub-segment; analyzingthe alignment indicator based on a first criteria; comparing the ADindicator with a second criteria; designating a candidate P-wave to bean actual P-wave based on the analyzing and comparing; and recordingresults of the designating.
 2. The system of claim 1, wherein the one ormore processors further configured to execute the specific executableinstructions for: identifying an R-wave COI from a beat in the series ofbeats; defining the P-wave search window to overlay the sub-segment ofthe CA signals at a predetermined time prior to the R-wave COI for thebeat; collecting the subsegment of the CA signals overlaid by the P-wavesearch window; repeating the identifying, defining and collecting toobtain on ensemble of subsegments for the series of beats, combining theensemble of subsegments to form an ensemble average of the CA signalswithin the P-wave search window for the series of beats; and calculatinga correlation of the ensemble average with the P-wave template to obtainthe alignment indicator.
 3. The system of claim 1, wherein the applyingby the one or more processors further comprises applying the P-wavetemplate to sub-segments of the CA signals along a P-wave search windowto obtain, as the alignment indicator, a temporal alignment (TA)indicator across the P-wave search window, and wherein the analyzing bythe one or more processors further comprises analyzing the TA indicatorbased on the first criteria to identify the candidate P-wave.
 4. Thesystem of claim 3, wherein the TA indicator represents a measure of howchanges in the P-wave template are associated with changes in thecorresponding subsegments of the CA signals and wherein the firstcriteria corresponds to a maximum for the TA indicator over the P-wavesearch window, the candidate P-wave corresponding to the subsegment ofthe CA signal for which the corresponding TA indicator has the maximum.5. The system of claim 3, wherein the one or more processors areconfigured to iteratively correlate the P-wave template to thesub-segments of the CA signals along the P-wave search window to obtaina correlation function across the P-wave search window as the temporalalignment indicator.
 6. The system of claim 5, wherein the one or moreprocessors are configured to analyze the temporal alignment indicator byidentify a peak in the correlation function and identify the candidateP-wave based on the peak in the correlation function.
 7. The system ofclaim 5, wherein the one or more processors are configured to calculatea covariance function based on the correlation function, the covariancefunction representing the AD indicator.
 8. The system of claim 7,wherein the second criteria represents a tolerance range that is definedbased on a peak of the P-wave template, and wherein the one or moreprocessors are configured to determine whether the covariance functionis within the tolerance range.
 9. The system of claim 1, wherein the oneor more processors are configured to apply the P-wave template to thesegments of an ensemble of CA signals collected over multiple beats. 10.The system of claim 1, wherein the one or more processors are configuredto calculate a plurality of P-wave templates associated with differentpostures and utilize a select one of the P-wave templates based on acurrent posture of the patient when the CA signals are collected.
 11. Acomputer implemented method, comprising: under control of one or moreprocessors configured with specific executable instructions, obtainingfar field cardiac activity (CA) signals for a series of beats; applyinga P-wave template to at least one sub-segment of the CA signals toobtain an alignment indicator; calculating an amplitude dependence (AD)indicator based at least in part on the P-wave template and the at leastone sub-segment; analyzing the alignment indicator based on a firstcriteria; comparing the AD indicator with a second criteria; designatinga candidate P-wave to be an actual P-wave based on the analyzing andcomparing; and recording results of the designating.
 12. The method ofclaim 11, further comprising: identifying an R-wave COI from a beat inthe series of beats; defining the P-wave search window to overlay thesub-segment of the CA signals at a predetermined time prior to theR-wave COI for the beat; collecting the subsegment of the CA signalsoverlaid by the P-wave search window; repeating the identifying,defining and collecting to obtain on ensemble of subsegments for theseries of beats, combining the ensemble of subsegments to form anensemble average of the CA signals within the P-wave search window forthe series of beats; and calculating a correlation of the ensembleaverage with the P-wave template to obtain the alignment indicator. 13.The method of claim 11, wherein the applying further comprises applyingthe P-wave template to sub-segments of the CA signals along a P-wavesearch window to obtain, as the alignment indicator, a temporalalignment (TA) indicator across the P-wave search window, and whereinthe analyzing further comprises analyzing the TA indicator based on thefirst criteria to identify the candidate P-wave.
 14. The method of claim13, wherein applying includes iteratively correlating the P-wavetemplate to the sub-segments of the CA signals along the P-wave searchwindow to obtain a correlation function across the P-wave search windowas the temporal alignment indicator.
 15. The method of claim 14, whereinthe analyzing the temporal alignment indicator based on the firstcriteria includes identifying a peak in the correlation function andidentifying the candidate P-wave based on the peak in the correlationfunction.
 16. The method of claim 11, wherein the one or more processorsare configured to at least one of: i) perform the applying, calculating,analyzing and comparing in a parallel manner, or ii) perform theapplying, calculating, analyzing and comparing in a serial manner. 17.The method of claim 11, wherein the CA signals represent intracardiacelectrograms (IEGM), the method further comprising calculating theP-wave template by: displaying on a graphical user interface (GUI) IEGMsignals and surface electrocardiogram (EKG) signals; receiving a userinput from the GUI an input designating at least one of: 1) P-waves onthe IEGM signals, 2) P-waves on surface EKG signals and P waves on theIEGM signals, or 3) P-waves on the surface EKG signals; the user inputdesignating select points corresponding to the P-waves; and identifyingthe segment of the CA signals that includes the corresponding P-waves.18. The method of claim 17, further comprising repeating the displaying,receiving and identifying to calculate a plurality of P-wave templatesassociated with different postures and utilizing a select one of theP-wave templates based on a current posture of the patient when the CAsignals are collected.
 19. The method of claim 18, further comprisingcalculating separate P-wave templates corresponding to a patientstanding, the patient sitting, the patient lying on his/her back, andthe patient lying on each side.
 20. The method of claim 11, wherein theobtaining the CA signals further comprises collecting the CA signals inreal time by an implantable medical device in connection with anarrhythmia detection process, the arrhythmia detection processescomprising: identifying variability in RR intervals within the series ofbeats in the CA signals; declaring an arrhythmia episode based onvariability in the RR intervals; storing a segment of the CA signals forthe series of beats in connection with the arrhythmia episode;iteratively implementing the applying, calculating, analyzing,comparing, and designating to determine whether actual P waves occurconsistently throughout the series of beats; and validating or rejectingthe arrhythmia episode based on the determination of whether the actualP waves occur consistently throughout the series of beats.